Skip to content

Commit

Permalink
Update openapi json file (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
AzulGarza authored Aug 16, 2024
1 parent d7a8f5f commit 5c3ffae
Show file tree
Hide file tree
Showing 15 changed files with 1,635 additions and 73 deletions.
903 changes: 852 additions & 51 deletions fern/openapi/timegpt.json

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions nixtla/_modidx.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,17 @@
'nixtla/nixtla_client.py'),
'nixtla.nixtla_client._validate_input_size': ( 'nixtla_client.html#_validate_input_size',
'nixtla/nixtla_client.py')},
'nixtla.types.anomaly_detection_output': {},
'nixtla.types.cross_validation_input_finetune_loss': {},
'nixtla.types.cross_validation_input_level_item': {},
'nixtla.types.cross_validation_output': {},
'nixtla.types.forecast_input_finetune_loss': {},
'nixtla.types.forecast_input_level_item': {},
'nixtla.types.forecast_output': {},
'nixtla.types.http_validation_error': {},
'nixtla.types.in_sample_input_level_item': {},
'nixtla.types.in_sample_output': {},
'nixtla.types.level': {},
'nixtla.types.model': {},
'nixtla.types.multi_series_anomaly': {},
'nixtla.types.multi_series_cross_validation': {},
Expand All @@ -123,6 +130,7 @@
'nixtla.types.multi_series_input': {},
'nixtla.types.multi_series_insample_forecast': {},
'nixtla.types.multi_series_insample_forecast_level_item': {},
'nixtla.types.series': {},
'nixtla.types.series_with_future_exogenous': {},
'nixtla.types.single_series_forecast': {},
'nixtla.types.single_series_forecast_fewshot_loss': {},
Expand Down
614 changes: 594 additions & 20 deletions nixtla/client.py

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions nixtla/types/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# This file was auto-generated by Fern from our API Definition.

from .anomaly_detection_output import AnomalyDetectionOutput
from .cross_validation_input_finetune_loss import CrossValidationInputFinetuneLoss
from .cross_validation_input_level_item import CrossValidationInputLevelItem
from .cross_validation_output import CrossValidationOutput
from .forecast_input_finetune_loss import ForecastInputFinetuneLoss
from .forecast_input_level_item import ForecastInputLevelItem
from .forecast_output import ForecastOutput
from .http_validation_error import HttpValidationError
from .in_sample_input_level_item import InSampleInputLevelItem
from .in_sample_output import InSampleOutput
from .level import Level
from .model import Model
from .multi_series_anomaly import MultiSeriesAnomaly
from .multi_series_cross_validation import MultiSeriesCrossValidation
Expand All @@ -17,6 +24,7 @@
from .multi_series_input import MultiSeriesInput
from .multi_series_insample_forecast import MultiSeriesInsampleForecast
from .multi_series_insample_forecast_level_item import MultiSeriesInsampleForecastLevelItem
from .series import Series
from .series_with_future_exogenous import SeriesWithFutureExogenous
from .single_series_forecast import SingleSeriesForecast
from .single_series_forecast_fewshot_loss import SingleSeriesForecastFewshotLoss
Expand All @@ -28,10 +36,17 @@
from .validation_error_loc_item import ValidationErrorLocItem

__all__ = [
"AnomalyDetectionOutput",
"CrossValidationInputFinetuneLoss",
"CrossValidationInputLevelItem",
"CrossValidationOutput",
"ForecastInputFinetuneLoss",
"ForecastInputLevelItem",
"ForecastOutput",
"HttpValidationError",
"InSampleInputLevelItem",
"InSampleOutput",
"Level",
"Model",
"MultiSeriesAnomaly",
"MultiSeriesCrossValidation",
Expand All @@ -45,6 +60,7 @@
"MultiSeriesInput",
"MultiSeriesInsampleForecast",
"MultiSeriesInsampleForecastLevelItem",
"Series",
"SeriesWithFutureExogenous",
"SingleSeriesForecast",
"SingleSeriesForecastFewshotLoss",
Expand Down
32 changes: 32 additions & 0 deletions nixtla/types/anomaly_detection_output.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ..core.datetime_utils import serialize_datetime
from ..core.pydantic_utilities import pydantic_v1


class AnomalyDetectionOutput(pydantic_v1.BaseModel):
input_tokens: int
output_tokens: int
finetune_tokens: int
mean: typing.List[float]
sizes: typing.List[int]
intervals: typing.Optional[typing.Dict[str, typing.Optional[typing.List[float]]]] = None
weights_x: typing.Optional[typing.List[float]] = None
anomaly: typing.List[bool]

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().json(**kwargs_with_defaults)

def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().dict(**kwargs_with_defaults)

class Config:
frozen = True
smart_union = True
extra = pydantic_v1.Extra.allow
json_encoders = {dt.datetime: serialize_datetime}
7 changes: 7 additions & 0 deletions nixtla/types/cross_validation_input_finetune_loss.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was auto-generated by Fern from our API Definition.

import typing

CrossValidationInputFinetuneLoss = typing.Union[
typing.Literal["default", "mae", "mse", "rmse", "mape", "smape"], typing.Any
]
5 changes: 5 additions & 0 deletions nixtla/types/cross_validation_input_level_item.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file was auto-generated by Fern from our API Definition.

import typing

CrossValidationInputLevelItem = typing.Union[int, float]
31 changes: 31 additions & 0 deletions nixtla/types/cross_validation_output.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ..core.datetime_utils import serialize_datetime
from ..core.pydantic_utilities import pydantic_v1


class CrossValidationOutput(pydantic_v1.BaseModel):
input_tokens: int
output_tokens: int
finetune_tokens: int
mean: typing.List[float]
sizes: typing.List[int]
idxs: typing.List[int]
intervals: typing.Optional[typing.Dict[str, typing.Optional[typing.List[float]]]] = None

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().json(**kwargs_with_defaults)

def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().dict(**kwargs_with_defaults)

class Config:
frozen = True
smart_union = True
extra = pydantic_v1.Extra.allow
json_encoders = {dt.datetime: serialize_datetime}
3 changes: 3 additions & 0 deletions nixtla/types/forecast_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@


class ForecastOutput(pydantic_v1.BaseModel):
input_tokens: int
output_tokens: int
finetune_tokens: int
mean: typing.List[float]
intervals: typing.Optional[typing.Dict[str, typing.Optional[typing.List[float]]]] = None
weights_x: typing.Optional[typing.List[float]] = None
Expand Down
5 changes: 5 additions & 0 deletions nixtla/types/in_sample_input_level_item.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file was auto-generated by Fern from our API Definition.

import typing

InSampleInputLevelItem = typing.Union[int, float]
31 changes: 31 additions & 0 deletions nixtla/types/in_sample_output.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ..core.datetime_utils import serialize_datetime
from ..core.pydantic_utilities import pydantic_v1


class InSampleOutput(pydantic_v1.BaseModel):
input_tokens: int
output_tokens: int
finetune_tokens: int
mean: typing.List[float]
sizes: typing.List[int]
intervals: typing.Optional[typing.Dict[str, typing.Optional[typing.List[float]]]] = None
weights_x: typing.Optional[typing.List[float]] = None

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().json(**kwargs_with_defaults)

def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().dict(**kwargs_with_defaults)

class Config:
frozen = True
smart_union = True
extra = pydantic_v1.Extra.allow
json_encoders = {dt.datetime: serialize_datetime}
5 changes: 5 additions & 0 deletions nixtla/types/level.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file was auto-generated by Fern from our API Definition.

import typing

Level = typing.Union[int, float]
36 changes: 36 additions & 0 deletions nixtla/types/series.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ..core.datetime_utils import serialize_datetime
from ..core.pydantic_utilities import pydantic_v1


class Series(pydantic_v1.BaseModel):
x: typing.Optional[typing.List[typing.List[float]]] = pydantic_v1.Field(alias="X", default=None)
y: typing.List[float] = pydantic_v1.Field()
"""
Historic values of the target.
"""

sizes: typing.List[int] = pydantic_v1.Field()
"""
Sizes of the individual series.
"""

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().json(**kwargs_with_defaults)

def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().dict(**kwargs_with_defaults)

class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = pydantic_v1.Extra.allow
json_encoders = {dt.datetime: serialize_datetime}
11 changes: 9 additions & 2 deletions nixtla/types/series_with_future_exogenous.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@
class SeriesWithFutureExogenous(pydantic_v1.BaseModel):
x_future: typing.Optional[typing.List[typing.List[float]]] = pydantic_v1.Field(alias="X_future", default=None)
x: typing.Optional[typing.List[typing.List[float]]] = pydantic_v1.Field(alias="X", default=None)
y: typing.List[float]
sizes: typing.List[int]
y: typing.List[float] = pydantic_v1.Field()
"""
Historic values of the target.
"""

sizes: typing.List[int] = pydantic_v1.Field()
"""
Sizes of the individual series.
"""

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"jupyterlab",
"nbdev",
"neuralforecast",
"numpy<2",
"plotly",
"polars",
"pre-commit",
Expand Down

0 comments on commit 5c3ffae

Please sign in to comment.