Skip to content

Commit

Permalink
Fix/representation of model with DataFrame/Array parameters (unit8co#…
Browse files Browse the repository at this point in the history
…1749)

* fix: added a test case when comparing the parameters for model string representation for pd.DataFrame and np.ndarray to avoid ambiguity when checking equality

* fix: using the proper operator to detect inequality

* fix: applying reviwer suggestion to simplify test

---------

Co-authored-by: Dennis Bader <dennis.bader@gmx.ch>
  • Loading branch information
2 people authored and alexcolpitts96 committed May 31, 2023
1 parent 3e155a7 commit d6d1806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion darts/models/forecasting/forecasting_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1912,7 +1912,7 @@ def _get_model_description_string(self, include_default_params):
changed_model_params = [
(k, v)
for k, v in self.model_params.items()
if include_default_params or v != default_model_params.get(k, None)
if include_default_params or np.any(v != default_model_params.get(k, None))
]

model_name = self.__class__.__name__
Expand Down

0 comments on commit d6d1806

Please sign in to comment.