time_series
time_series
¶
Classes:
| Name | Description |
|---|---|
TimeSeriesParameters |
Configuration for time-series mode in the Safe Synthesizer pipeline. |
TimeSeriesParameters
pydantic-model
¶
Bases: Parameters
Configuration for time-series mode in the Safe Synthesizer pipeline.
Controls whether a dataset is treated as time-series data, including timestamp column selection, interval inference, and format validation. The time-series pipeline is currently experimental.
Fields:
-
is_timeseries(bool) -
timestamp_column(str | None) -
timestamp_interval_seconds(int | None) -
timestamp_format(str | None) -
start_timestamp(str | int | None) -
stop_timestamp(str | int | None)
Validators:
is_timeseries
pydantic-field
¶
Whether to treat the dataset as time series. When enabled, either timestamp_column or timestamp_interval_seconds is required. For grouped time series, group_training_examples_by needs to be set.
timestamp_column
pydantic-field
¶
Name of the column containing timestamps used to order records when is_timeseries is True. Required only when is_timeseries is True and timestamp_interval_seconds is not provided.
timestamp_interval_seconds
pydantic-field
¶
Interval in seconds between timestamps. If not provided, the timestamp column will be used to infer the interval.
timestamp_format
pydantic-field
¶
Format of the timestamp column. Accepts either: (1) Python strftime format codes for string timestamps (e.g., '%Y-%m-%d %H:%M:%S', '%m/%d/%Y'), or (2) 'elapsed_seconds' for numeric (int/float) timestamps representing seconds as an increasing counter (e.g., 0, 60, 120 for 1-minute intervals). If not provided, the format will be inferred from the data.
start_timestamp
pydantic-field
¶
Start timestamp. If not provided, the first timestamp in the timestamp column will be used.
stop_timestamp
pydantic-field
¶
Stop timestamp. If not provided, the last timestamp in the timestamp column will be used.
validate_timestamp_format(v)
pydantic-validator
¶
Validate that timestamp_format is a valid strftime format string.
Source code in src/nemo_safe_synthesizer/config/time_series.py
check_timestamp_column_or_interval_when_timeseries()
pydantic-validator
¶
Validate that time-series mode has a timestamp source and non-timeseries mode has no timestamp_column.