From 7a5df8f7f5f96f9db231b8a4dea9ee866dba8f5d Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 23:00:26 +0000 Subject: [PATCH] SDK regeneration --- docs-scripts | 1 - nixtlats/client.py | 50 ++++++++++++++++++++++++ nixtlats/types/single_series_forecast.py | 3 ++ 3 files changed, 53 insertions(+), 1 deletion(-) delete mode 160000 docs-scripts diff --git a/docs-scripts b/docs-scripts deleted file mode 160000 index d63d0269..00000000 --- a/docs-scripts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d63d02696ad23a3104636207152d2ac393291315 diff --git a/nixtlats/client.py b/nixtlats/client.py index 9a36e5e3..35f489ef 100644 --- a/nixtlats/client.py +++ b/nixtlats/client.py @@ -54,6 +54,7 @@ def timegpt(self, *, request: SingleSeriesForecast) -> typing.Any: def timegpt_historic( self, *, + model: typing.Optional[str] = OMIT, freq: typing.Optional[str] = OMIT, level: typing.Optional[typing.List[typing.Any]] = OMIT, y: typing.Optional[typing.Any] = OMIT, @@ -64,6 +65,8 @@ def timegpt_historic( Based on the provided data, this endpoint predicts time series data for the in-sample period (historical period). It takes a JSON as an input, including information like the series frequency and the historical data. (See below for a full description of the parameters.) The response contains the predicted values for the historical period. Usually useful for anomaly detection. Get your token for private beta at https://dashboard.nixtla.io. Parameters: + - model: typing.Optional[str]. Model to use as a string. Options are: `timegpt-1`, and `timegpt-1-long-horizon.` We recommend using `timegpt-1-long-horizon` for forecasting if you want to predict more than one seasonal period given the frequency of your data. + - freq: typing.Optional[str]. The frequency of the data represented as a string. 'D' for daily, 'M' for monthly, 'H' for hourly, and 'W' for weekly frequencies are available. - level: typing.Optional[typing.List[typing.Any]]. A list of values representing the prediction intervals. Each value is a percentage that indicates the level of certainty for the corresponding prediction interval. For example, [80, 90] defines 80% and 90% prediction intervals. @@ -75,6 +78,8 @@ def timegpt_historic( - clean_ex_first: typing.Optional[bool]. A boolean flag that indicates whether the API should preprocess (clean) the exogenous signal before applying the large time model. If True, the exogenous signal is cleaned; if False, the exogenous variables are applied after the large time model. """ _request: typing.Dict[str, typing.Any] = {} + if model is not OMIT: + _request["model"] = model if freq is not OMIT: _request["freq"] = freq if level is not OMIT: @@ -105,6 +110,7 @@ def timegpt_historic( def timegpt_multi_series( self, *, + model: typing.Optional[str] = OMIT, freq: typing.Optional[str] = OMIT, level: typing.Optional[typing.List[typing.Any]] = OMIT, fh: typing.Optional[int] = OMIT, @@ -117,6 +123,8 @@ def timegpt_multi_series( Based on the provided data, this endpoint predicts the future values of multiple time series at once. It takes a JSON as an input containing information like the series frequency and historical data. (See below for a full description of the parameters.) The response contains the predicted values for each series based on the input arguments. Get your token for private beta at https://dashboard.nixtla.io. Parameters: + - model: typing.Optional[str]. Model to use as a string. Options are: `timegpt-1`, and `timegpt-1-long-horizon.` We recommend using `timegpt-1-long-horizon` for forecasting if you want to predict more than one seasonal period given the frequency of your data. + - freq: typing.Optional[str]. The frequency of the data represented as a string. 'D' for daily, 'M' for monthly, 'H' for hourly, and 'W' for weekly frequencies are available. - level: typing.Optional[typing.List[typing.Any]]. A list of values representing the prediction intervals. Each value is a percentage that indicates the level of certainty for the corresponding prediction interval. For example, [80, 90] defines 80% and 90% prediction intervals. @@ -132,6 +140,8 @@ def timegpt_multi_series( - finetune_steps: typing.Optional[int]. The number of tuning steps used to train the large time model on the data. Set this value to 0 for zero-shot inference, i.e., to make predictions without any further model tuning. """ _request: typing.Dict[str, typing.Any] = {} + if model is not OMIT: + _request["model"] = model if freq is not OMIT: _request["freq"] = freq if level is not OMIT: @@ -166,6 +176,7 @@ def timegpt_multi_series( def timegpt_multi_series_historic( self, *, + model: typing.Optional[str] = OMIT, freq: typing.Optional[str] = OMIT, level: typing.Optional[typing.List[typing.Any]] = OMIT, y: typing.Optional[typing.Any] = OMIT, @@ -176,6 +187,8 @@ def timegpt_multi_series_historic( Based on the provided data, this endpoint predicts the in-sample period (historical period) values of multiple time series at once. It takes a JSON as an input containing information like the series frequency and historical data. (See below for a full description of the parameters.) The response contains the predicted values for the historical period. Usually useful for anomaly detection. Get your token for private beta at https://dashboard.nixtla.io. Parameters: + - model: typing.Optional[str]. Model to use as a string. Options are: `timegpt-1`, and `timegpt-1-long-horizon.` We recommend using `timegpt-1-long-horizon` for forecasting if you want to predict more than one seasonal period given the frequency of your data. + - freq: typing.Optional[str]. The frequency of the data represented as a string. 'D' for daily, 'M' for monthly, 'H' for hourly, and 'W' for weekly frequencies are available. - level: typing.Optional[typing.List[typing.Any]]. A list of values representing the prediction intervals. Each value is a percentage that indicates the level of certainty for the corresponding prediction interval. For example, [80, 90] defines 80% and 90% prediction intervals. @@ -187,6 +200,8 @@ def timegpt_multi_series_historic( - clean_ex_first: typing.Optional[bool]. A boolean flag that indicates whether the API should preprocess (clean) the exogenous signal before applying the large time model. If True, the exogenous signal is cleaned; if False, the exogenous variables are applied after the large time model. """ _request: typing.Dict[str, typing.Any] = {} + if model is not OMIT: + _request["model"] = model if freq is not OMIT: _request["freq"] = freq if level is not OMIT: @@ -217,6 +232,7 @@ def timegpt_multi_series_historic( def timegpt_multi_series_anomalies( self, *, + model: typing.Optional[str] = OMIT, freq: typing.Optional[str] = OMIT, level: typing.Optional[typing.List[typing.Any]] = OMIT, y: typing.Optional[typing.Any] = OMIT, @@ -227,6 +243,8 @@ def timegpt_multi_series_anomalies( Based on the provided data, this endpoint detects the anomalies in the historical perdiod of multiple time series at once. It takes a JSON as an input containing information like the series frequency and historical data. (See below for a full description of the parameters.) The response contains a flag indicating if the date has a anomaly and also provides the prediction interval used to define if an observation is an anomaly.Get your token for private beta at https://dashboard.nixtla.io. Parameters: + - model: typing.Optional[str]. Model to use as a string. Options are: `timegpt-1`, and `timegpt-1-long-horizon.` We recommend using `timegpt-1-long-horizon` for forecasting if you want to predict more than one seasonal period given the frequency of your data. + - freq: typing.Optional[str]. The frequency of the data represented as a string. 'D' for daily, 'M' for monthly, 'H' for hourly, and 'W' for weekly frequencies are available. - level: typing.Optional[typing.List[typing.Any]]. Specifies the confidence level for the prediction interval used in anomaly detection. It is represented as a percentage between 0 and 100. For instance, a level of 95 indicates that the generated prediction interval captures the true future observation 95% of the time. Any observed values outside of this interval would be considered anomalies. A higher level leads to wider prediction intervals and potentially fewer detected anomalies, whereas a lower level results in narrower intervals and potentially more detected anomalies. Default: 99. @@ -238,6 +256,8 @@ def timegpt_multi_series_anomalies( - clean_ex_first: typing.Optional[bool]. A boolean flag that indicates whether the API should preprocess (clean) the exogenous signal before applying the large time model. If True, the exogenous signal is cleaned; if False, the exogenous variables are applied after the large time model. """ _request: typing.Dict[str, typing.Any] = {} + if model is not OMIT: + _request["model"] = model if freq is not OMIT: _request["freq"] = freq if level is not OMIT: @@ -268,6 +288,7 @@ def timegpt_multi_series_anomalies( def timegpt_multi_series_cross_validation( self, *, + model: typing.Optional[str] = OMIT, freq: typing.Optional[str] = OMIT, level: typing.Optional[typing.List[typing.Any]] = OMIT, fh: typing.Optional[int] = OMIT, @@ -282,6 +303,8 @@ def timegpt_multi_series_cross_validation( Perform Cross Validation for multiple series Parameters: + - model: typing.Optional[str]. Model to use as a string. Options are: `timegpt-1`, and `timegpt-1-long-horizon.` We recommend using `timegpt-1-long-horizon` for forecasting if you want to predict more than one seasonal period given the frequency of your data. + - freq: typing.Optional[str]. The frequency of the data represented as a string. 'D' for daily, 'M' for monthly, 'H' for hourly, and 'W' for weekly frequencies are available. - level: typing.Optional[typing.List[typing.Any]]. A list of values representing the prediction intervals. Each value is a percentage that indicates the level of certainty for the corresponding prediction interval. For example, [80, 90] defines 80% and 90% prediction intervals. @@ -301,6 +324,8 @@ def timegpt_multi_series_cross_validation( - clean_ex_first: typing.Optional[bool]. A boolean flag that indicates whether the API should preprocess (clean) the exogenous signal before applying the large time model. If True, the exogenous signal is cleaned; if False, the exogenous variables are applied after the large time model. """ _request: typing.Dict[str, typing.Any] = {} + if model is not OMIT: + _request["model"] = model if freq is not OMIT: _request["freq"] = freq if level is not OMIT: @@ -446,6 +471,7 @@ async def timegpt(self, *, request: SingleSeriesForecast) -> typing.Any: async def timegpt_historic( self, *, + model: typing.Optional[str] = OMIT, freq: typing.Optional[str] = OMIT, level: typing.Optional[typing.List[typing.Any]] = OMIT, y: typing.Optional[typing.Any] = OMIT, @@ -456,6 +482,8 @@ async def timegpt_historic( Based on the provided data, this endpoint predicts time series data for the in-sample period (historical period). It takes a JSON as an input, including information like the series frequency and the historical data. (See below for a full description of the parameters.) The response contains the predicted values for the historical period. Usually useful for anomaly detection. Get your token for private beta at https://dashboard.nixtla.io. Parameters: + - model: typing.Optional[str]. Model to use as a string. Options are: `timegpt-1`, and `timegpt-1-long-horizon.` We recommend using `timegpt-1-long-horizon` for forecasting if you want to predict more than one seasonal period given the frequency of your data. + - freq: typing.Optional[str]. The frequency of the data represented as a string. 'D' for daily, 'M' for monthly, 'H' for hourly, and 'W' for weekly frequencies are available. - level: typing.Optional[typing.List[typing.Any]]. A list of values representing the prediction intervals. Each value is a percentage that indicates the level of certainty for the corresponding prediction interval. For example, [80, 90] defines 80% and 90% prediction intervals. @@ -467,6 +495,8 @@ async def timegpt_historic( - clean_ex_first: typing.Optional[bool]. A boolean flag that indicates whether the API should preprocess (clean) the exogenous signal before applying the large time model. If True, the exogenous signal is cleaned; if False, the exogenous variables are applied after the large time model. """ _request: typing.Dict[str, typing.Any] = {} + if model is not OMIT: + _request["model"] = model if freq is not OMIT: _request["freq"] = freq if level is not OMIT: @@ -497,6 +527,7 @@ async def timegpt_historic( async def timegpt_multi_series( self, *, + model: typing.Optional[str] = OMIT, freq: typing.Optional[str] = OMIT, level: typing.Optional[typing.List[typing.Any]] = OMIT, fh: typing.Optional[int] = OMIT, @@ -509,6 +540,8 @@ async def timegpt_multi_series( Based on the provided data, this endpoint predicts the future values of multiple time series at once. It takes a JSON as an input containing information like the series frequency and historical data. (See below for a full description of the parameters.) The response contains the predicted values for each series based on the input arguments. Get your token for private beta at https://dashboard.nixtla.io. Parameters: + - model: typing.Optional[str]. Model to use as a string. Options are: `timegpt-1`, and `timegpt-1-long-horizon.` We recommend using `timegpt-1-long-horizon` for forecasting if you want to predict more than one seasonal period given the frequency of your data. + - freq: typing.Optional[str]. The frequency of the data represented as a string. 'D' for daily, 'M' for monthly, 'H' for hourly, and 'W' for weekly frequencies are available. - level: typing.Optional[typing.List[typing.Any]]. A list of values representing the prediction intervals. Each value is a percentage that indicates the level of certainty for the corresponding prediction interval. For example, [80, 90] defines 80% and 90% prediction intervals. @@ -524,6 +557,8 @@ async def timegpt_multi_series( - finetune_steps: typing.Optional[int]. The number of tuning steps used to train the large time model on the data. Set this value to 0 for zero-shot inference, i.e., to make predictions without any further model tuning. """ _request: typing.Dict[str, typing.Any] = {} + if model is not OMIT: + _request["model"] = model if freq is not OMIT: _request["freq"] = freq if level is not OMIT: @@ -558,6 +593,7 @@ async def timegpt_multi_series( async def timegpt_multi_series_historic( self, *, + model: typing.Optional[str] = OMIT, freq: typing.Optional[str] = OMIT, level: typing.Optional[typing.List[typing.Any]] = OMIT, y: typing.Optional[typing.Any] = OMIT, @@ -568,6 +604,8 @@ async def timegpt_multi_series_historic( Based on the provided data, this endpoint predicts the in-sample period (historical period) values of multiple time series at once. It takes a JSON as an input containing information like the series frequency and historical data. (See below for a full description of the parameters.) The response contains the predicted values for the historical period. Usually useful for anomaly detection. Get your token for private beta at https://dashboard.nixtla.io. Parameters: + - model: typing.Optional[str]. Model to use as a string. Options are: `timegpt-1`, and `timegpt-1-long-horizon.` We recommend using `timegpt-1-long-horizon` for forecasting if you want to predict more than one seasonal period given the frequency of your data. + - freq: typing.Optional[str]. The frequency of the data represented as a string. 'D' for daily, 'M' for monthly, 'H' for hourly, and 'W' for weekly frequencies are available. - level: typing.Optional[typing.List[typing.Any]]. A list of values representing the prediction intervals. Each value is a percentage that indicates the level of certainty for the corresponding prediction interval. For example, [80, 90] defines 80% and 90% prediction intervals. @@ -579,6 +617,8 @@ async def timegpt_multi_series_historic( - clean_ex_first: typing.Optional[bool]. A boolean flag that indicates whether the API should preprocess (clean) the exogenous signal before applying the large time model. If True, the exogenous signal is cleaned; if False, the exogenous variables are applied after the large time model. """ _request: typing.Dict[str, typing.Any] = {} + if model is not OMIT: + _request["model"] = model if freq is not OMIT: _request["freq"] = freq if level is not OMIT: @@ -609,6 +649,7 @@ async def timegpt_multi_series_historic( async def timegpt_multi_series_anomalies( self, *, + model: typing.Optional[str] = OMIT, freq: typing.Optional[str] = OMIT, level: typing.Optional[typing.List[typing.Any]] = OMIT, y: typing.Optional[typing.Any] = OMIT, @@ -619,6 +660,8 @@ async def timegpt_multi_series_anomalies( Based on the provided data, this endpoint detects the anomalies in the historical perdiod of multiple time series at once. It takes a JSON as an input containing information like the series frequency and historical data. (See below for a full description of the parameters.) The response contains a flag indicating if the date has a anomaly and also provides the prediction interval used to define if an observation is an anomaly.Get your token for private beta at https://dashboard.nixtla.io. Parameters: + - model: typing.Optional[str]. Model to use as a string. Options are: `timegpt-1`, and `timegpt-1-long-horizon.` We recommend using `timegpt-1-long-horizon` for forecasting if you want to predict more than one seasonal period given the frequency of your data. + - freq: typing.Optional[str]. The frequency of the data represented as a string. 'D' for daily, 'M' for monthly, 'H' for hourly, and 'W' for weekly frequencies are available. - level: typing.Optional[typing.List[typing.Any]]. Specifies the confidence level for the prediction interval used in anomaly detection. It is represented as a percentage between 0 and 100. For instance, a level of 95 indicates that the generated prediction interval captures the true future observation 95% of the time. Any observed values outside of this interval would be considered anomalies. A higher level leads to wider prediction intervals and potentially fewer detected anomalies, whereas a lower level results in narrower intervals and potentially more detected anomalies. Default: 99. @@ -630,6 +673,8 @@ async def timegpt_multi_series_anomalies( - clean_ex_first: typing.Optional[bool]. A boolean flag that indicates whether the API should preprocess (clean) the exogenous signal before applying the large time model. If True, the exogenous signal is cleaned; if False, the exogenous variables are applied after the large time model. """ _request: typing.Dict[str, typing.Any] = {} + if model is not OMIT: + _request["model"] = model if freq is not OMIT: _request["freq"] = freq if level is not OMIT: @@ -660,6 +705,7 @@ async def timegpt_multi_series_anomalies( async def timegpt_multi_series_cross_validation( self, *, + model: typing.Optional[str] = OMIT, freq: typing.Optional[str] = OMIT, level: typing.Optional[typing.List[typing.Any]] = OMIT, fh: typing.Optional[int] = OMIT, @@ -674,6 +720,8 @@ async def timegpt_multi_series_cross_validation( Perform Cross Validation for multiple series Parameters: + - model: typing.Optional[str]. Model to use as a string. Options are: `timegpt-1`, and `timegpt-1-long-horizon.` We recommend using `timegpt-1-long-horizon` for forecasting if you want to predict more than one seasonal period given the frequency of your data. + - freq: typing.Optional[str]. The frequency of the data represented as a string. 'D' for daily, 'M' for monthly, 'H' for hourly, and 'W' for weekly frequencies are available. - level: typing.Optional[typing.List[typing.Any]]. A list of values representing the prediction intervals. Each value is a percentage that indicates the level of certainty for the corresponding prediction interval. For example, [80, 90] defines 80% and 90% prediction intervals. @@ -693,6 +741,8 @@ async def timegpt_multi_series_cross_validation( - clean_ex_first: typing.Optional[bool]. A boolean flag that indicates whether the API should preprocess (clean) the exogenous signal before applying the large time model. If True, the exogenous signal is cleaned; if False, the exogenous variables are applied after the large time model. """ _request: typing.Dict[str, typing.Any] = {} + if model is not OMIT: + _request["model"] = model if freq is not OMIT: _request["freq"] = freq if level is not OMIT: diff --git a/nixtlats/types/single_series_forecast.py b/nixtlats/types/single_series_forecast.py index 26db5067..e506cac2 100644 --- a/nixtlats/types/single_series_forecast.py +++ b/nixtlats/types/single_series_forecast.py @@ -9,6 +9,9 @@ class SingleSeriesForecast(pydantic.BaseModel): + model: typing.Optional[str] = pydantic.Field( + description="Model to use as a string. Options are: `timegpt-1`, and `timegpt-1-long-horizon.` We recommend using `timegpt-1-long-horizon` for forecasting if you want to predict more than one seasonal period given the frequency of your data." + ) freq: typing.Optional[str] = pydantic.Field( description="The frequency of the data represented as a string. 'D' for daily, 'M' for monthly, 'H' for hourly, and 'W' for weekly frequencies are available." )