Skip to content

Commit 415a0ec

Browse files
committed
Make version mismatch warning informative and actionable
The old warning told users to downgrade, which is unhelpful when they upgraded intentionally. The new message states both versions, notes that there may be minor differences in defaults or behavior, and tells the user to re-save the object to remove the warning. Closes #4495
1 parent d6db325 commit 415a0ec

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/spikeinterface/core/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,8 @@ def _load_extractor_from_dict(dic) -> "BaseExtractor":
11511151
if is_old_version:
11521152
warnings.warn(
11531153
f"This object was saved with {module_name}=={saved_version} and you are running {module_name}=={current_version}. "
1154-
f"To update the saved version, re-save the object with `save()` or `save_to_folder()`/`save_to_zarr()`."
1154+
f"This may lead to differences in default parameters or minor changes in behavior. "
1155+
f"To remove this warning, re-save the object with `save()` or `save_to_folder()`/`save_to_zarr()`."
11551156
)
11561157

11571158
if hasattr(extractor_class, "_handle_backward_compatibility"):

0 commit comments

Comments
 (0)