From b1d63c61c4fd301c5bff59af36aa2acc0e51250c Mon Sep 17 00:00:00 2001 From: Oleksandr Shchur Date: Mon, 19 Jan 2026 12:44:07 +0000 Subject: [PATCH] Mention that timestamps need to regularly spaced --- src/chronos/base.py | 3 ++- src/chronos/chronos2/pipeline.py | 3 ++- src/chronos/df_utils.py | 8 +++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/chronos/base.py b/src/chronos/base.py index 31c1f28..2bba087 100644 --- a/src/chronos/base.py +++ b/src/chronos/base.py @@ -168,7 +168,8 @@ class BaseChronosPipeline(metaclass=PipelineRegistry): [ADVANCED] When True (default), validates dataframes before prediction. Setting to False removes the validation overhead, but may silently lead to wrong predictions if data is misformatted. When False, you must ensure: (1) all dataframes are sorted by (id_column, timestamp_column); (2) future_df (if provided) - has the same item IDs as df with exactly prediction_length rows of future timestamps per item. + has the same item IDs as df with exactly prediction_length rows of future timestamps per item; (3) all + timestamps are regularly spaced (e.g., with hourly frequency). freq Frequency string for timestamp generation (e.g., "h", "D", "W"). Can only be used when validate_inputs=False. When provided, skips frequency inference from the data. diff --git a/src/chronos/chronos2/pipeline.py b/src/chronos/chronos2/pipeline.py index a489c3d..c7ccbbb 100644 --- a/src/chronos/chronos2/pipeline.py +++ b/src/chronos/chronos2/pipeline.py @@ -868,7 +868,8 @@ class Chronos2Pipeline(BaseChronosPipeline): [ADVANCED] When True (default), validates dataframes before prediction. Setting to False removes the validation overhead, but may silently lead to wrong predictions if data is misformatted. When False, you must ensure: (1) all dataframes are sorted by (id_column, timestamp_column); (2) future_df (if provided) - has the same item IDs as df with exactly prediction_length rows of future timestamps per item. + has the same item IDs as df with exactly prediction_length rows of future timestamps per item; (3) all + timestamps are regularly spaced (e.g., with hourly frequency). freq Frequency string for timestamp generation (e.g., "h", "D", "W"). Can only be used when validate_inputs=False. When provided, skips frequency inference from the data. diff --git a/src/chronos/df_utils.py b/src/chronos/df_utils.py index 8e14b12..3adc1b0 100644 --- a/src/chronos/df_utils.py +++ b/src/chronos/df_utils.py @@ -234,7 +234,8 @@ def convert_df_input_to_list_of_dicts_input( [ADVANCED] When True (default), validates dataframes before prediction. Setting to False removes the validation overhead, but may silently lead to wrong predictions if data is misformatted. When False, you must ensure: (1) all dataframes are sorted by (id_column, timestamp_column); (2) future_df (if provided) - has the same item IDs as df with exactly prediction_length rows of future timestamps per item. + has the same item IDs as df with exactly prediction_length rows of future timestamps per item; (3) all + timestamps are regularly spaced (e.g., with hourly frequency). freq Frequency string for timestamp generation (e.g., "h", "D", "W"). Can only be used when validate_inputs=False. When provided, skips frequency inference from the data. @@ -254,8 +255,9 @@ def convert_df_input_to_list_of_dicts_input( "freq can only be provided when validate_inputs=False. " "When using freq with validate_inputs=False, you must ensure: " "(1) all dataframes are sorted by (id_column, timestamp_column); " - "future_df (if provided) has the same item IDs as df with exactly " - "prediction_length rows of future timestamps per item." + "(2) future_df (if provided) has the same item IDs as df with exactly " + "prediction_length rows of future timestamps per item; " + "(3) all timestamps are regularly spaced." ) if validate_inputs: