-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate prepare_module #3166
Deprecate prepare_module #3166
Conversation
module_path, hash, base_path, namespace = prepare_module( | ||
path, | ||
return_associated_base_path=True, | ||
return_namespace=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lhoestq could you please verify that this PR does not break this because of the parameter return_namespace
?
Before this PR, this parameter no longer existed in the signature of prepare_module
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for these changes :)
src/datasets/load.py
Outdated
@@ -1263,13 +1263,18 @@ def prepare_module( | |||
**download_kwargs, | |||
) -> Union[Tuple[str, str], Tuple[str, str, Optional[str]]]: | |||
"""For backward compatibility. Please use dataset_module_factory or metric_module_factory instead.""" | |||
warnings.warn( | |||
"'prepare_module' was superseded by 'dataset_module_factory' and 'metric_module_factory' in version 1.13 and " | |||
"will be removed in version 1.15.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.15 will be the next release, maybe wait for 1.16 ?
"will be removed in version 1.15.", | |
"will be removed in version 1.16.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lhoestq, indeed, prepare_module
was deprecated in 1.13 version, therefore +2 to be removed.
But I agree that we are making minor releases so often, that maybe we should change the rule to +3 or +4 or even to next major release!
Sounds good, thanks ! |
In version 1.13,
prepare_module
was deprecated.This PR adds a deprecation warning and removes it from all the library, using
dataset_module_factory
ormetric_module_factory
instead.Fix #3165.