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

Issue 31 #123

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion etna/core/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
saved_etna_version = tuple(metadata["etna_version"])

# if major version is different give a warning
if current_etna_version[0] != saved_etna_version[0] or current_etna_version[:2] < saved_etna_version[:2]:
if current_etna_version != saved_etna_version:

Check warning on line 288 in etna/core/mixins.py

View check run for this annotation

Codecov / codecov/patch

etna/core/mixins.py#L288

Added line #L288 was not covered by tests
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(
Expand Down
1 change: 1 addition & 0 deletions etna/models/nn/deepstate/deepstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,3 +323,4 @@ def __init__(
trainer_params=trainer_params,
split_params=split_params,
)

2 changes: 1 addition & 1 deletion tests/test_core/test_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_save_mixin_load_ok(recwarn, tmp_path):


@pytest.mark.parametrize(
"save_version, load_version", [((1, 5, 0), (2, 5, 0)), ((2, 5, 0), (1, 5, 0)), ((1, 5, 0), (1, 3, 0))]
"save_version, load_version", [((1, 5, 0), (2, 5, 0)), ((2, 5, 0), (1, 5, 0)), ((1, 5, 0), (1, 3, 0)) , ((1, 5, 0), (1, 3, 0)), ((1, 5, 0), (1, 5, 1)), ((1, 5, 1), (1, 5, 0))]
)
@patch("etna.core.mixins.get_etna_version")
def test_save_mixin_load_warning(get_version_mock, save_version, load_version, tmp_path):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ensembles/test_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def test_save_mixin_load_ok_with_ts(example_tsds, recwarn, tmp_path):


@pytest.mark.parametrize(
"save_version, load_version", [((1, 5, 0), (2, 5, 0)), ((2, 5, 0), (1, 5, 0)), ((1, 5, 0), (1, 3, 0))]
"save_version, load_version", [((1, 5, 0), (2, 5, 0)), ((2, 5, 0), (1, 5, 0)), ((1, 5, 0), (1, 3, 0)), ((1, 5, 0), (1, 3, 0)), ((1, 5, 0), (1, 5, 1)), ((1, 5, 1), (1, 5, 0))]
)
@patch("etna.core.mixins.get_etna_version")
def test_save_mixin_load_warning(get_version_mock, save_version, load_version, example_tsds, tmp_path):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_load_without_ts(naive_pipeline_with_transforms, recwarn, tmp_path):


@pytest.mark.parametrize(
"save_version, load_version", [((1, 5, 0), (2, 5, 0)), ((2, 5, 0), (1, 5, 0)), ((1, 5, 0), (1, 3, 0))]
"save_version, load_version", [((1, 5, 0), (2, 5, 0)), ((2, 5, 0), (1, 5, 0)), ((1, 5, 0), (1, 3, 0)), ((1, 5, 0), (1, 3, 0)), ((1, 5, 0), (1, 5, 1)), ((1, 5, 1), (1, 5, 0))]
)
@patch("etna.core.mixins.get_etna_version")
def test_save_mixin_load_warning(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_models/test_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def test_save_pf_mixin_with_model_load_ok(recwarn, tmp_path):
],
)
@pytest.mark.parametrize(
"save_version, load_version", [((1, 5, 0), (2, 5, 0)), ((2, 5, 0), (1, 5, 0)), ((1, 5, 0), (1, 3, 0))]
"save_version, load_version", [((1, 5, 0), (2, 5, 0)), ((2, 5, 0), (1, 5, 0)), ((1, 5, 0), (1, 3, 0)), ((1, 5, 0), (1, 3, 0)), ((1, 5, 0), (1, 5, 1)), ((1, 5, 1), (1, 5, 0))]
)
@patch("etna.core.mixins.get_etna_version")
def test_save_mixin_load_warning(get_version_mock, save_version, load_version, dummy, tmp_path):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pipeline/test_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def test_save_mixin_load_ok_with_ts(example_tsds, recwarn, tmp_path):


@pytest.mark.parametrize(
"save_version, load_version", [((1, 5, 0), (2, 5, 0)), ((2, 5, 0), (1, 5, 0)), ((1, 5, 0), (1, 3, 0))]
"save_version, load_version", [((1, 5, 0), (2, 5, 0)), ((2, 5, 0), (1, 5, 0)), ((1, 5, 0), (1, 3, 0)), ((1, 5, 0), (1, 3, 0)), ((1, 5, 0), (1, 5, 1)), ((1, 5, 1), (1, 5, 0))]
)
@patch("etna.core.mixins.get_etna_version")
def test_save_mixin_load_warning(get_version_mock, save_version, load_version, example_tsds, tmp_path):
Expand Down
Loading