neuralforecast
neuralforecast copied to clipboard
points_to_evaluate parameter
In ray.tune, with some algorithms, you can suggest starting points for optimization (if you already have some decent hyperparameters).
E.g. see the "points_to_evaluate" parameter in https://docs.ray.io/en/latest/tune/api/doc/ray.tune.search.hyperopt.HyperOptSearch.html
Is there a way to provide "points_to_evaluate" to the Auto* classes in neuralforecast? This can be useful if you previously run an Auto* model (e.g. AutoNHITS) and you want to suggest the best points of the previous run to the new Auto* run.
hey @candalfigomoro! Thanks for using neuralforecast.
The Auto
classes receive a parameter called search_alg
which receives a ray.tune.search.searcher.Searcher class. So, you can instantiate the HyperOptSearch
class with your parameters and pass it to the Auto
class, for example:
hyperopt_alg = HyperOptSearch(points_to_evaluate=...)
models = [AutoNHITS(..., search_alg=hyperopt_alg)]
nf = NeuralForecast(models=models, freq="M")
nf.fit(Y_df)
Thanks @FedericoGarza!
In that case, should I also provide the search space through the space
parameter of the HyperOptSearch
class or should I keep using the config
parameter of the AutoNHITS
class?
Hi @candalfigomoro. We have a tutorial on how to use HyperOptSearch
in https://nixtla.github.io/neuralforecast/examples/automatic_hyperparameter_tuning.html