-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[timeseries] add model registry and fix presets typing #5100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -244,7 +192,7 @@ def get_preset_models( | |||
f"Keys of the `hyperparameters` dictionary must be strings or types, received {type(model)}." | |||
) | |||
|
|||
for model_hps in hyperparameters[model]: | |||
for model_hps in hyperparameter_dict[model]: | |||
ag_args = model_hps.pop(constants.AG_ARGS, {}) |
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.
Thanks, the PR looks great! I guess we can also move this logic closer to the TimeSeriesTrainer
at some point. IMO, there should be just one "preset_configs" file that contains
- equivalent of the
get_default_hps
method - preset configurations
Everything else feels like it should be a part of the trainer.
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.
this has already gotten a little big so I'll defer to a fast-follow PR.
f56b9da
to
4ce1647
Compare
4ce1647
to
61b7365
Compare
7513af8
to
e1fe105
Compare
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.
Looks great, thank you!
279ae34
to
d618c99
Compare
_aliases = ["Qux"] | ||
pass | ||
|
||
class QuxModel(metaclass=ModelRegistry): |
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.
Should we use with pytest.raises(...)
here to assert that the exception is raised?
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.
huh. I had done this, interesting the branch didn't sync...
"""Abstract base class for all time series models that take historical data as input and | ||
make predictions for the forecast horizon. | ||
""" | ||
|
||
default_priority: int = 0 |
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.
Should we align the name of the priority var across tabular and timeseries?
Similarly, should we have ag_name
and ag_key
? This is what I use for the model registry logic in Tabular.
class CatBoostModel(AbstractModel):
ag_key = "CAT"
ag_name = "CatBoost"
ag_priority = 70
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.
My answer again to the "should we align?" question is again "not without a compelling reason." Independently, I like ag_priority
better so will use that. Analogues for key and name don't exist anyway so won't use those.
Job PR-5100-f514314 is done. |
Issue #, if available:
Description of changes:
ModelRegistry
to time series. By default, all models which inherit fromAbstractTimeSeriesModel
will be registered.default_priority
to a field defined by models (WIP).By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.