18
18
get_frequency_of_datetime ,
19
19
)
20
20
21
- from ..const import ForecastOutputColumns , SupportedModels
21
+ from ..const import ForecastOutputColumns , SupportedModels , TROUBLESHOOTING_GUIDE
22
22
from ..operator_config import ForecastOperatorConfig
23
23
24
24
@@ -49,7 +49,8 @@ def _verify_dt_col(self, spec):
49
49
f"{ SupportedModels .AutoMLX } requires data with a frequency of at least one hour. Please try using a different model,"
50
50
" or select the 'auto' option."
51
51
)
52
- raise InvalidParameterError (message )
52
+ raise InvalidParameterError (f"{ message } "
53
+ f"\n Please refer to the troubleshooting guide at { TROUBLESHOOTING_GUIDE } for resolution steps." )
53
54
54
55
55
56
class AdditionalData (AbstractData ):
@@ -65,10 +66,12 @@ def __init__(self, spec, historical_data, additional_data=None, subset=None):
65
66
if historical_data .get_max_time () > add_dates [- spec .horizon ]:
66
67
raise DataMismatchError (
67
68
f"The Historical Data ends on { historical_data .get_max_time ()} . The additional data horizon starts on { add_dates [- spec .horizon ]} . The horizon should have exactly { spec .horizon } dates after the Historical at a frequency of { historical_data .freq } "
69
+ f"\n Please refer to the troubleshooting guide at { TROUBLESHOOTING_GUIDE } for resolution steps."
68
70
)
69
71
elif historical_data .get_max_time () != add_dates [- (spec .horizon + 1 )]:
70
72
raise DataMismatchError (
71
73
f"The Additional Data must be present for all historical data and the entire horizon. The Historical Data ends on { historical_data .get_max_time ()} . The additonal data horizon starts after { add_dates [- (spec .horizon + 1 )]} . These should be the same date."
74
+ f"\n Please refer to the troubleshooting guide at { TROUBLESHOOTING_GUIDE } for resolution steps."
72
75
)
73
76
else :
74
77
self .name = "additional_data"
@@ -215,6 +218,7 @@ def get_data_at_series(self, s_id, include_horizon=True):
215
218
except Exception as e :
216
219
raise InvalidParameterError (
217
220
f"Unable to retrieve series id: { s_id } from data. Available series ids are: { self .list_series_ids ()} "
221
+ f"\n Please refer to the troubleshooting guide at { TROUBLESHOOTING_GUIDE } for resolution steps."
218
222
) from e
219
223
220
224
def get_horizon_at_series (self , s_id ):
@@ -296,6 +300,7 @@ def add_series_id(
296
300
if not overwrite and series_id in self .series_id_map :
297
301
raise ValueError (
298
302
f"Attempting to update ForecastOutput for series_id { series_id } when this already exists. Set overwrite to True."
303
+ f"\n Please refer to the troubleshooting guide at { TROUBLESHOOTING_GUIDE } for resolution steps."
299
304
)
300
305
forecast = self ._check_forecast_format (forecast )
301
306
self .series_id_map [series_id ] = forecast
@@ -336,6 +341,7 @@ def populate_series_output(
336
341
except KeyError as e :
337
342
raise ValueError (
338
343
f"Attempting to update output for series: { series_id } , however no series output has been initialized."
344
+ f"\n Please refer to the troubleshooting guide at { TROUBLESHOOTING_GUIDE } for resolution steps."
339
345
) from e
340
346
341
347
if (output_i .shape [0 ] - self .horizon ) == len (fit_val ):
@@ -356,18 +362,21 @@ def populate_series_output(
356
362
if len (forecast_val ) != self .horizon :
357
363
raise ValueError (
358
364
f"Attempting to set forecast along horizon ({ self .horizon } ) for series: { series_id } , however forecast is only length { len (forecast_val )} "
365
+ f"\n Please refer to the troubleshooting guide at { TROUBLESHOOTING_GUIDE } for resolution steps."
359
366
)
360
367
output_i ["forecast_value" ].iloc [- self .horizon :] = forecast_val
361
368
362
369
if len (upper_bound ) != self .horizon :
363
370
raise ValueError (
364
371
f"Attempting to set upper_bound along horizon ({ self .horizon } ) for series: { series_id } , however upper_bound is only length { len (upper_bound )} "
372
+ f"\n Please refer to the troubleshooting guide at { TROUBLESHOOTING_GUIDE } for resolution steps."
365
373
)
366
374
output_i [self .upper_bound_name ].iloc [- self .horizon :] = upper_bound
367
375
368
376
if len (lower_bound ) != self .horizon :
369
377
raise ValueError (
370
378
f"Attempting to set lower_bound along horizon ({ self .horizon } ) for series: { series_id } , however lower_bound is only length { len (lower_bound )} "
379
+ f"\n Please refer to the troubleshooting guide at { TROUBLESHOOTING_GUIDE } for resolution steps."
371
380
)
372
381
output_i [self .lower_bound_name ].iloc [- self .horizon :] = lower_bound
373
382
0 commit comments