-
Notifications
You must be signed in to change notification settings - Fork 80
Forecast start_timestamp
for CLI command
#1265
Conversation
🚀 Deployed on https://deploy-preview-1265--etna-docs.netlify.app |
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #1265 +/- ##
==========================================
+ Coverage 87.78% 88.02% +0.24%
==========================================
Files 175 186 +11
Lines 10439 10774 +335
==========================================
+ Hits 9164 9484 +320
- Misses 1275 1290 +15
... and 16 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
CHANGELOG.md
Outdated
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
### Added | |||
- Notebook `forecast_interpretation.ipynb` with forecast decomposition ([#1220](https://github.com/tinkoff-ai/etna/pull/1220)) | |||
- Exogenous variables shift transform `ExogShiftTransform`([#1254](https://github.com/tinkoff-ai/etna/pull/1254)) | |||
- | |||
- `start_timestamp` parameter to forecast CLI command ([#1265](https://github.com/tinkoff-ai/etna/pull/1265)) |
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.
I would prefer to put the word parameter at the beginning.
docs/source/commands.rst
Outdated
|
||
* :code:`prediction_interval` - whether to estimate prediction interval for forecast. | ||
* :code:`quantiles` - levels of prediction distribution. By default 2.5% and 97.5% are taken to form a 95% prediction interval. | ||
* :code:`n_folds` - number of folds to use in the backtest for prediction interval estimation. |
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.
May be we should give here a link to the class where this parameters are explained in documentation.
etna/commands/forecast_command.py
Outdated
horizon = compute_horizon(horizon=horizon, forecast_params=forecast_params, tsdataset=tsdataset) | ||
pipeline_configs["horizon"] = horizon # type: ignore | ||
|
||
forecast_args = drop_additional_forecast_params(forecast_params) |
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.
It a difficult to understand naming. May be it is better to name it forecast_call_params
or forecast_method_params
.
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.
Sorry, I meant variable forecast_args
, not method name.
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.
Oh, ok)
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.
Probably new name for method is also good, but it should be named get_forecast_call_params
. Replace forecast_args
with forecast_call_params
. And update the name of the tests accordingly.
tests/test_commands/test_forecast.py
Outdated
@@ -100,3 +106,112 @@ def test_forecast_use_exog_correct( | |||
pd.testing.assert_series_equal( | |||
df_output["target"], pd.Series(data=[3.0, 3.0, 3.0], name="target"), check_less_precise=1 | |||
) | |||
|
|||
|
|||
@pytest.fixture() |
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.
We usually don't add ()
on fixtures.
tests/test_commands/test_forecast.py
Outdated
|
||
|
||
@pytest.mark.parametrize("forecast_params", ({"start_timestamp": "2020-04-09"}, {"start_timestamp": "2019-04-10"})) | ||
def test_update_horizon_error(example_tsds, forecast_params, pipeline_dummy_config): |
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.
test_update_horizon_error
-> test_compute_horizon_error
?
tests/test_commands/test_forecast.py
Outdated
({"start_timestamp": "2023-06-01"}, "ms_tsds", 4), | ||
), | ||
) | ||
def test_update_horizon(forecast_params, tsdataset_name, expected, request, pipeline_dummy_config): |
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.
test_update_horizon
-> test_compute_horizon
?
CHANGELOG.md
Outdated
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
### Added | |||
- Notebook `forecast_interpretation.ipynb` with forecast decomposition ([#1220](https://github.com/tinkoff-ai/etna/pull/1220)) | |||
- Exogenous variables shift transform `ExogShiftTransform`([#1254](https://github.com/tinkoff-ai/etna/pull/1254)) | |||
- | |||
- Parameter `start_timestamp` parameter to forecast CLI command ([#1265](https://github.com/tinkoff-ai/etna/pull/1265)) |
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.
Probably, the second word "parameter" should be removed.
etna/commands/forecast_command.py
Outdated
horizon = compute_horizon(horizon=horizon, forecast_params=forecast_params, tsdataset=tsdataset) | ||
pipeline_configs["horizon"] = horizon # type: ignore | ||
|
||
forecast_args = drop_additional_forecast_params(forecast_params) |
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.
Sorry, I meant variable forecast_args
, not method name.
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.
Little changes to do.
tests/test_commands/test_forecast.py
Outdated
), | ||
), | ||
) | ||
def test_drop_additional_forecast_params(params, expected): |
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.
test_get_forecast_call_params
.
Before submitting (must do checklist)
Proposed Changes
Closing issues
closes #1247