@@ -199,13 +199,10 @@ class NeuralProphet:
199199 * ``shared_neural_nets``
200200 * ``shared_neural_nets_coef``
201201
202- future_regressors_d_hidden: int
203- Number of hidden layers in the neural network model for future regressors.
204- Ignored if ``future_regressors_model`` is ``linear``.
202+ future_regressors_layers: list of int
203+ list of hidden layer dimensions of the future regressor nets. Specifies number of hidden layers (number of entries)
204+ and layer dimension (list entry). Default [] (no hidden layers)
205205
206- future_regressors_num_hidden_layers: int
207- Dimension of hidden layers in the neural network model for future regressors.
208- Ignored if ``future_regressors_model`` is ``linear``.
209206
210207 COMMENT
211208 AR Config
@@ -438,8 +435,7 @@ def __init__(
438435 season_global_local : np_types .SeasonGlobalLocalMode = "global" ,
439436 seasonality_local_reg : Optional [Union [bool , float ]] = False ,
440437 future_regressors_model : np_types .FutureRegressorsModel = "linear" ,
441- future_regressors_d_hidden : int = 4 ,
442- future_regressors_num_hidden_layers : int = 2 ,
438+ future_regressors_layers : Optional [list ] = [],
443439 n_forecasts : int = 1 ,
444440 n_lags : int = 0 ,
445441 ar_layers : Optional [list ] = [],
@@ -557,8 +553,7 @@ def __init__(
557553 self .config_lagged_regressors : Optional [configure .ConfigLaggedRegressors ] = None
558554 self .config_regressors = configure .ConfigFutureRegressors (
559555 model = future_regressors_model ,
560- d_hidden = future_regressors_d_hidden ,
561- num_hidden_layers = future_regressors_num_hidden_layers ,
556+ regressors_layers = future_regressors_layers ,
562557 ) # Optional[configure.ConfigFutureRegressors] = None
563558
564559 # set during fit()
@@ -2864,13 +2859,12 @@ def _train(
28642859 lr_finder = tuner .lr_find (
28652860 model = self .model ,
28662861 train_dataloaders = train_loader ,
2867- val_dataloaders = val_loader ,
2862+ # val_dataloaders=val_loader, # not be used, but may lead to Lightning bug if not provided
28682863 ** self .config_train .lr_finder_args ,
28692864 )
28702865 # Estimate the optimal learning rate from the loss curve
28712866 assert lr_finder is not None
2872- _ , _ , lr_suggestion = utils .smooth_loss_and_suggest (lr_finder .results )
2873- self .model .learning_rate = lr_suggestion
2867+ _ , _ , self .model .learning_rate = utils .smooth_loss_and_suggest (lr_finder )
28742868 start = time .time ()
28752869 self .trainer .fit (
28762870 self .model ,
@@ -2891,8 +2885,7 @@ def _train(
28912885 )
28922886 assert lr_finder is not None
28932887 # Estimate the optimal learning rate from the loss curve
2894- _ , _ , lr_suggestion = utils .smooth_loss_and_suggest (lr_finder .results )
2895- self .model .learning_rate = lr_suggestion
2888+ _ , _ , self .model .learning_rate = utils .smooth_loss_and_suggest (lr_finder )
28962889 start = time .time ()
28972890 self .trainer .fit (
28982891 self .model ,
0 commit comments