Skip to content

Add forecast components handling to base classes of models #1158

Merged
merged 16 commits into from Mar 15, 2023

Conversation

alex-hse-repository
Copy link
Collaborator

Before submitting (must do checklist)

  • Did you read the contribution guide?
  • Did you update the docs? We use Numpy format for all the methods and classes.
  • Did you write any new necessary tests?
  • Did you update the CHANGELOG?

Proposed Changes

Closing issues

closes #1124

@github-actions
Copy link

github-actions bot commented Mar 9, 2023

@github-actions github-actions bot temporarily deployed to pull request March 9, 2023 10:14 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 9, 2023 10:19 Inactive
CHANGELOG.md Outdated Show resolved Hide resolved
etna/models/mixins.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Mar 13, 2023

Codecov Report

Merging #1158 (4f7231b) into master (93f8959) will increase coverage by 0.30%.
The diff coverage is 97.59%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master    #1158      +/-   ##
==========================================
+ Coverage   86.60%   86.91%   +0.30%     
==========================================
  Files         166      177      +11     
  Lines        9555     9925     +370     
==========================================
+ Hits         8275     8626     +351     
- Misses       1280     1299      +19     
Impacted Files Coverage Δ
etna/models/mixins.py 97.11% <97.18%> (+1.14%) ⬆️
etna/models/base.py 86.33% <100.00%> (+0.15%) ⬆️
etna/models/nn/deepar.py 97.33% <100.00%> (+0.07%) ⬆️
etna/models/nn/tft.py 97.82% <100.00%> (+0.04%) ⬆️

... and 13 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions github-actions bot temporarily deployed to pull request March 13, 2023 07:22 Inactive
)
@pytest.mark.parametrize("return_components", (True, False))
def test_model_mixins_calls_add_target_components_in_forecast(mixin_constructor, return_components, call_params):
with patch.multiple(mixin_constructor, __abstractmethods__=set()):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is it for? Looks very suspicious.



@pytest.mark.parametrize("mixin_constructor", [PerSegmentModelMixin])
def test_make_prediction_segment_with_components(mixin_constructor, target_components_df, ts_without_target_components):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't changed _make_predictions_segment in this task, do we really need this test?

Should we add other tests on this method as well (no components, handling prediction_size, etc)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we check how it works with target components

@github-actions github-actions bot temporarily deployed to pull request March 14, 2023 10:52 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 14, 2023 12:09 Inactive
from etna.models.mixins import SaveNNMixin


class DummyPredictAdapter(BaseAdapter):
def fit(self, df: pd.DataFrame, **kwargs) -> "DummyAdapter":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typing is incorrect



class DummyForecastPredictAdapter(DummyPredictAdapter):
def fit(self, df: pd.DataFrame, **kwargs) -> "DummyAdapter":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typing is incorrect

@github-actions github-actions bot temporarily deployed to pull request March 14, 2023 15:42 Inactive
@alex-hse-repository alex-hse-repository merged commit ea1888e into master Mar 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add forecast components handling to base classes of models
3 participants