Skip to content

Commit

Permalink
add public function untrained_model() in docs (#2684)
Browse files Browse the repository at this point in the history
* remove untrained_model from autodoc exclude-members

* update changelog and untrained_model docs

---------

Co-authored-by: dennisbader <[email protected]>
  • Loading branch information
turbotimon and dennisbader authored Feb 19, 2025
1 parent 534618f commit 3aa5c97
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ but cannot always guarantee backwards compatibility. Changes that may **break co

**Improved**

- Made method `ForecastingModel.untrained_model()` public. Use this method to get a new (untrained) model instance created with the same parameters. [#2684](https://github.com/unit8co/darts/pull/2684) by [Timon Erhart](https://github.com/turbotimon)

**Fixed**

**Dependencies**
Expand Down
2 changes: 1 addition & 1 deletion darts/models/forecasting/forecasting_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2601,7 +2601,7 @@ def _extract_model_creation_params(self):
return model_params

def untrained_model(self):
"""Returns a new (untrained) model instance create with the same parameters."""
"""Returns a new (untrained) model instance created with the same parameters."""
return self.__class__(**copy.deepcopy(self.model_params))

@property
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
+ "PastCovariatesTorchModel,FutureCovariatesTorchModel,DualCovariatesTorchModel,MixedCovariatesTorchModel,"
+ "SplitCovariatesTorchModel,"
+ "min_train_series_length,"
+ "untrained_model,first_prediction_index,future_covariate_series,past_covariate_series,"
+ "first_prediction_index,future_covariate_series,past_covariate_series,"
+ "initialize_encoders,register_datapipe_as_function,register_function,functions,"
+ "SplitTimeSeriesSequence,randint,AnomalyModel",
}
Expand Down

0 comments on commit 3aa5c97

Please sign in to comment.