Pre-loaded input DataFrame with training data. The DataFrame must contain a datetime column matching config.index_name plus at least one numeric target column. Optional for the "clean" task, required for all others.
WeightFunction: all sample weights for the requested index are zero (the window falls entirely within gap-penalty zones). Returning None so ForecasterRecursive uses uniform weighting.
Result keys: ['train_actual', 'train_pred', 'future_actual', 'future_pred']
[clean] Dry run — would delete: /tmp/tmpy8toxilu
Would remove: logging
status: dry_run
run_task_defaults
multitask.MultiTask.run_task_defaults(show=True)
Defaults fitting — no tuning, no cached params.
Distinct from run_task_lazy only in that it never consults the tuning-result cache. Use this for deterministic baselines and for ENTSO-E “Approach 2: Training without Tuning”.
WeightFunction: all sample weights for the requested index are zero (the window falls entirely within gap-penalty zones). Returning None so ForecasterRecursive uses uniform weighting.
Result keys: ['train_actual', 'train_pred', 'future_actual', 'future_pred']
WeightFunction: all sample weights for the requested index are zero (the window falls entirely within gap-penalty zones). Returning None so ForecasterRecursive uses uniform weighting.
Result keys: ['train_actual', 'train_pred', 'future_actual', 'future_pred']
WeightFunction: all sample weights for the requested index are zero (the window falls entirely within gap-penalty zones). Returning None so ForecasterRecursive uses uniform weighting.
WeightFunction: all sample weights for the requested index are zero (the window falls entirely within gap-penalty zones). Returning None so ForecasterRecursive uses uniform weighting.
WeightFunction: all sample weights for the requested index are zero (the window falls entirely within gap-penalty zones). Returning None so ForecasterRecursive uses uniform weighting.
WeightFunction: all sample weights for the requested index are zero (the window falls entirely within gap-penalty zones). Returning None so ForecasterRecursive uses uniform weighting.
Result keys: ['train_actual', 'train_pred', 'future_actual', 'future_pred']
import warningsimport tempfilewarnings.filterwarnings("ignore")from spotforecast2_safe.data.fetch_data import fetch_data, get_package_data_homefrom spotforecast2_safe.configurator.config_multi import ConfigMultifrom spotforecast2.multitask import MultiTaskdata_home = get_package_data_home()df = fetch_data(filename=str(data_home /"demo10.csv")).iloc[:500]cache_dir = tempfile.mkdtemp()# First train and save a model with the lazy task.config_train = ConfigMulti( predict_size=12, targets=["A"], lags_consider=[1, 2, 3], window_size=4, number_folds=2, use_exogenous_features=False, use_outlier_detection=False, auto_save_models=True, verbose=False,)config_train.cache_home = cache_dirmt_train = MultiTask(config_train, task="lazy", dataframe=df, show_progress=False)mt_train.prepare_data()mt_train.impute()mt_train.run_task_lazy(show=False)# Then load and predict without re-training.config_pred = ConfigMulti( predict_size=12, targets=["A"], lags_consider=[1, 2, 3], window_size=4, number_folds=2, use_exogenous_features=False, use_outlier_detection=False, auto_save_models=False, verbose=False,)config_pred.cache_home = cache_dirmt_pred = MultiTask(config_pred, task="predict", dataframe=df, show_progress=False)mt_pred.prepare_data()mt_pred.impute()result = mt_pred.run_task_predict(show=False, task_name="lazy")print("Result keys:", list(result.keys())[:4])assert"future_pred"in result
WeightFunction: all sample weights for the requested index are zero (the window falls entirely within gap-penalty zones). Returning None so ForecasterRecursive uses uniform weighting.
Result keys: ['train_actual', 'train_pred', 'future_actual', 'future_pred']
WeightFunction: all sample weights for the requested index are zero (the window falls entirely within gap-penalty zones). Returning None so ForecasterRecursive uses uniform weighting.
WeightFunction: all sample weights for the requested index are zero (the window falls entirely within gap-penalty zones). Returning None so ForecasterRecursive uses uniform weighting.
WeightFunction: all sample weights for the requested index are zero (the window falls entirely within gap-penalty zones). Returning None so ForecasterRecursive uses uniform weighting.
WeightFunction: all sample weights for the requested index are zero (the window falls entirely within gap-penalty zones). Returning None so ForecasterRecursive uses uniform weighting.
`Forecaster` refitted using the best-found lags and parameters, and the whole data set:
Lags: [ 1 2 23 24 47 48]
Parameters: {'estimator__num_leaves': 212, 'estimator__max_depth': 8, 'estimator__learning_rate': 0.022237942587898952, 'estimator__n_estimators': 23, 'estimator__bagging_fraction': 0.8966718932567622, 'estimator__feature_fraction': 0.6759904724131447, 'estimator__reg_alpha': 80.46568296843319, 'estimator__reg_lambda': 37.13270777695332}
Backtesting metric: 24013.098401317144
Result keys: ['train_actual', 'train_pred', 'future_actual', 'future_pred']