Skip to content

Inference v2.1 for etna v2 #1177

Merged
merged 30 commits into from
Mar 23, 2023
Merged

Inference v2.1 for etna v2 #1177

merged 30 commits into from
Mar 23, 2023

Conversation

Mr-Geekman
Copy link
Contributor

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

Add

  • Add refit parameter into backtest (#1159)
  • Add stride parameter into backtest (#1165)
  • Add optional parameter ts into forecast method of pipelines (#1071)
  • Add tests on transform method of transforms on subset of segments, on new segments, on future with gap (#1094)
  • Add tests on inverse_transform method of transforms on subset of segments, on new segments, on future with gap (#1127)

Change

  • Add more scenarios into tests for models (#1082)
  • Decouple SeasonalMovingAverageModel from PerSegmentModelMixin (#1132)
  • Decouple DeadlineMovingAverageModel from PerSegmentModelMixin (#1140)

Fix

  • Fix inference tests on new segments for DeepARModel and TFTModel (#1109)
  • Fix alignment during forecasting in new NNs, add validation of context size during forecasting in new NNs, add validation of batch in MLPNet (#1108)
  • Fix MeanSegmentEncoderTransform to work with subset of segments and raise error on new segments (#1104)
  • Fix outliers transforms on future with gap (#1147)
  • Fix SegmentEncoderTransform to work with subset of segments and raise error on new segments (#1103)
  • Fix SklearnTransform in per-segment mode to work on subset of segments and raise error on new segments (#1107)
  • Fix OutliersTransform and its children to raise error on new segments (#1139)
  • Fix DifferencingTransform to raise error on new segments during transform and inverse_transform in inplace mode (#1141)
  • Teach DifferencingTransform to inverse_transform with NaNs (#1155)

Closing issues

Mr-Geekman and others added 21 commits January 19, 2023 13:02
# Conflicts:
#	.github/workflows/test.yml
#	CHANGELOG.md
#	etna/models/base.py
#	etna/pipeline/base.py
#	etna/pipeline/hierarchical_pipeline.py
#	etna/pipeline/pipeline.py
#	etna/transforms/base.py
#	etna/transforms/encoders/mean_segment_encoder.py
#	etna/transforms/encoders/segment_encoder.py
#	etna/transforms/math/differencing.py
#	etna/transforms/math/sklearn.py
#	etna/transforms/outliers/base.py
#	etna/transforms/timestamp/special_days.py
#	etna/transforms/utils.py
#	tests/test_datasets/test_dataset.py
#	tests/test_models/test_base.py
#	tests/test_models/test_inference/common.py
#	tests/test_models/test_inference/test_forecast.py
#	tests/test_models/test_inference/test_predict.py
#	tests/test_pipeline/test_hierarchical_pipeline.py
#	tests/test_transforms/test_encoders/conftest.py
#	tests/test_transforms/test_encoders/test_mean_segment_encoder_transform.py
#	tests/test_transforms/test_math/test_differencing_transform.py
#	tests/test_transforms/test_math/test_sklearn_transform_interface.py
#	tests/test_transforms/test_outliers/test_outliers_transform.py
@Mr-Geekman Mr-Geekman added this to the Inference 2.1 milestone Mar 21, 2023
@Mr-Geekman Mr-Geekman self-assigned this Mar 21, 2023
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions
Copy link

github-actions bot commented Mar 21, 2023

@github-actions github-actions bot temporarily deployed to pull request March 21, 2023 14:53 Inactive
@Mr-Geekman Mr-Geekman changed the title Inference v2.1 Inference v2.1 for etna-2.0 Mar 21, 2023
@Mr-Geekman Mr-Geekman changed the title Inference v2.1 for etna-2.0 Inference v2.1 for etna-v2 Mar 21, 2023
@Mr-Geekman Mr-Geekman changed the title Inference v2.1 for etna-v2 Inference v2.1 for etna v2 Mar 21, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2023

Codecov Report

Merging #1177 (60b68b8) into master (65aef8e) will increase coverage by 0.40%.
The diff coverage is 97.62%.

📣 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    #1177      +/-   ##
==========================================
+ Coverage   87.17%   87.58%   +0.40%     
==========================================
  Files         177      177              
  Lines       10090    10267     +177     
==========================================
+ Hits         8796     8992     +196     
+ Misses       1294     1275      -19     
Impacted Files Coverage Δ
etna/transforms/utils.py 90.90% <88.88%> (-9.10%) ⬇️
etna/pipeline/hierarchical_pipeline.py 97.46% <91.66%> (-1.13%) ⬇️
etna/transforms/base.py 92.71% <91.66%> (-0.30%) ⬇️
etna/models/seasonal_ma.py 97.05% <96.36%> (-2.95%) ⬇️
etna/transforms/math/sklearn.py 96.75% <96.92%> (+2.26%) ⬆️
etna/models/deadline_ma.py 95.00% <97.22%> (+0.55%) ⬆️
etna/pipeline/base.py 95.90% <98.87%> (+1.54%) ⬆️
etna/ensembles/direct_ensemble.py 96.55% <100.00%> (+1.55%) ⬆️
etna/ensembles/mixins.py 100.00% <100.00%> (ø)
etna/ensembles/stacking_ensemble.py 98.21% <100.00%> (+1.60%) ⬆️
... and 11 more

... and 4 files with indirect coverage changes

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

d.a.bunin added 6 commits March 22, 2023 14:46
# Conflicts:
#	etna/ensembles/direct_ensemble.py
#	etna/ensembles/stacking_ensemble.py
#	etna/ensembles/voting_ensemble.py
#	etna/pipeline/autoregressive_pipeline.py
#	etna/pipeline/base.py
#	etna/pipeline/hierarchical_pipeline.py
#	etna/pipeline/pipeline.py
#	tests/test_ensembles/test_direct_ensemble.py
#	tests/test_ensembles/test_stacking_ensemble.py
#	tests/test_ensembles/test_voting_ensemble.py
#	tests/test_models/test_inference/test_forecast.py
#	tests/test_models/test_inference/test_predict.py
#	tests/test_pipeline/conftest.py
#	tests/test_pipeline/test_autoregressive_pipeline.py
#	tests/test_pipeline/test_hierarchical_pipeline.py
#	tests/test_pipeline/test_pipeline.py
#	tests/utils.py
@github-actions github-actions bot temporarily deployed to pull request March 22, 2023 13:41 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 22, 2023 14:31 Inactive
@@ -390,17 +391,56 @@ def test_forecast_given_ts(model, transforms, reconciliator, product_level_const
because it is difficult to set it up for hierarchy.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can't we use assert_pipeline_forecasts_given_ts here?

@@ -128,8 +128,6 @@ def _forecast(self, ts: TSDataset, return_components: bool) -> TSDataset:
In each point in the future, forecast of the ensemble is forecast of base pipeline with the shortest horizon,
which covers this point.
"""
if self.ts is None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it the only redundant check like this?

@github-actions github-actions bot temporarily deployed to pull request March 23, 2023 07:46 Inactive
@Mr-Geekman Mr-Geekman merged commit df78d2e into master Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants