Skip to content
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

Change warning condition on loading object saved under different library version #31

Closed
Mr-Geekman opened this issue Aug 14, 2023 · 0 comments · Fixed by #121
Closed
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers priority/low Low priority task

Comments

@Mr-Geekman
Copy link

Mr-Geekman commented Aug 14, 2023

Issue by Mr-Geekman
Thursday May 25, 2023 at 13:54 GMT
Originally opened as tinkoff-ai#1270


🚀 Feature Request

Currently we have this condition on loading object saved under different library version:

        if current_etna_version[0] != saved_etna_version[0] or current_etna_version[:2] < saved_etna_version[:2]:
            current_etna_version_str = ".".join([str(x) for x in current_etna_version])
            saved_etna_version_str = ".".join([str(x) for x in saved_etna_version])
            warnings.warn(
                f"The object was saved under etna version {saved_etna_version_str} "
                f"but running version is {current_etna_version_str}, this can cause problems with compatibility!"
            )

We should simplify this condition and give a warning if version is different: current_etna_version != saved_etna_version, because we don't have forward or backward compatibility for saving.

Proposal

Change the condition in

  • etna.core.mixins.SaveMixin._validate_metadata

Test cases

Fix tests:

  • tests.test_core.test_mixins.test_save_mixin_load_warning
    • Add params (1, 5, 0), (1, 3, 0)
    • Add params (1, 5, 0), (1, 5, 1)
    • Add params (1, 5, 1), (1, 5, 0)
  • tests.test_pipeline.test_save_mixin_load_warning
    • Same
  • tests.test_ensembles.test_save_mixin_load_warning
    • Same
  • tests.test_models.test_save_mixin_load_warning
    • Same
  • tests.test_experimental.test_prediction_intervals.test_save_mixin_load_warning
    • Same

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers priority/low Low priority task
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants