Repository navigation
Fix saved model path collisions across paradigms - #1206
bruAristimunha merged 6 commits into
Conversation
|
@bruAristimunha this is ready for maintainer review when convenient. It fixes #1182 by namespacing saved evaluation artifacts by paradigm and optional suffix and targets |
bruAristimunha
left a comment
There was a problem hiding this comment.
Thanks @lindicaphxag-tech — the collision in #1182 is real and namespacing by paradigm/suffix is the natural fix. The code reads fine and the private helper keeps its old layout when paradigm is omitted. Because this changes the on-disk layout of saved models for everyone, I want to think about the migration story (existing Models_* trees become orphaned) before approving; I've approved the Actions run so CI can speak in the meantime. Merge-order note for the series: this one goes first, #1211 last.
|
Migration follow-up on current head I tightened the migration story instead:
This keeps the collision fix non-destructive and avoids assigning false provenance to old artifacts. If you prefer a warning when a legacy tree is detected during a new save, I can add that, but I would avoid moving/copying it automatically. |
38d4be2 to
8459398
Compare
|
Rebased onto current The current head is |
|
Added two regression checks on current head c471dd8: the fake WithinSession evaluation now verifies that a model artifact is actually written beneath the paradigm/suffix namespace, and the path test covers the GridSearch namespace as well. pre-commit.ci, link-check, Python syntax compilation, and git diff --check pass; this environment still lacks pytest, and the fresh upstream matrix is running. |
c471dd8 to
8a49db4
Compare
bruAristimunha
left a comment
There was a problem hiding this comment.
Thanks @lindicaphxag-tech — the migration story on this head is the right call: legacy Models_*/GridSearch_* trees stay where they are (no false-provenance auto-move), the API-change note spells it out, and noplot_load_model.py points at the new canonical path. The two new regressions (paradigm-scoped save on the fake WithinSession eval, GridSearch namespace isolation) make the contract load-bearing. CI green on c471dd8. Approving and merging.
Summary
Fixes #1182 by namespacing saved evaluation artifacts with the paradigm and optional run suffix. Two benchmark runs that share an evaluation type, dataset, subject, session, and pipeline no longer overwrite one another when their paradigm or suffix differs.
The layout is now:
<Models|GridSearch>_<evaluation>/<Paradigm>/<suffix-if-set>/<dataset>/<subject>/<session>/<pipeline>/The model path change is documented as an API compatibility change. Calls to the private path helper that omit
paradigmretain their previous layout.Validation
git diff --checkpython -m py_compile moabb/evaluations/base.py moabb/evaluations/utils.py moabb/tests/test_evaluations.pyuv run --active --no-sync python -m pytest moabb/tests/test_evaluations.py -q -k 'create_save_path or test_within_session_evaluation_save_model'— 11 passed.