Skip to main content

autotimeseries

Nixtla SDK. Time Series Forecasting pipeline at scale.

CI python sdk Python PyPi License

autotimeseries is a python SDK to consume the APIs developed in https://github.com/Nixtla/nixtla.

Install

PyPI

pip install autotimeseries

How to use

Check the following examples for a full pipeline:

Basic usage

import os

from autotimeseries.core import AutoTS

autotimeseries = AutoTS(bucket_name=os.environ['BUCKET_NAME'],
                        api_id=os.environ['API_ID'], 
                        api_key=os.environ['API_KEY'],
                        aws_access_key_id=os.environ['AWS_ACCESS_KEY_ID'], 
                        aws_secret_access_key=os.environ['AWS_SECRET_ACCESS_KEY'])

Upload dataset to S3

train_dir = '../data/m5/parquet/train'
# File with target variables
filename_target = autotimeseries.upload_to_s3(f'{train_dir}/target.parquet')
# File with static variables
filename_static = autotimeseries.upload_to_s3(f'{train_dir}/static.parquet')
# File with temporal variables
filename_temporal = autotimeseries.upload_to_s3(f'{train_dir}/temporal.parquet')

Each time series of the uploaded datasets is defined by the column item_id. Meanwhile the time column is defined by timestamp and the target column by demand. We need to pass this arguments to each call.

columns = dict(unique_id_column='item_id',
               ds_column='timestamp',
               y_column='demand')

Send the job to make forecasts

response_forecast = autotimeseries.tsforecast(filename_target=filename_target,
                                              freq='D',
                                              horizon=28, 
                                              filename_static=filename_static,
                                              filename_temporal=filename_temporal,
                                              objective='tweedie',
                                              metric='rmse',
                                              n_estimators=170,
                                              **columns)

Download forecasts

autotimeseries.download_from_s3(filename='forecasts_2021-10-12_19-04-32.csv', filename_output='../data/forecasts.csv')

Metadata

Release files for autotimeseries 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autotimeseries 0.0.7
File Size Uploaded Provenance Actions
autotimeseries-0.0.7.tar.gz 13.5 kB Without provenance Details for autotimeseries-0.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for autotimeseries 0.0.7
File Interpreter ABI Platform Actions
autotimeseries-0.0.7-py3-none-any.whl Python 3 none any Details for autotimeseries-0.0.7-py3-none-any.whl

Total release size: 24.3 kB

Release files / autotimeseries-0.0.7.tar.gz

Download URL autotimeseries-0.0.7.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8c30f61fd4b7b397320086904d8a35dd7c91f36f6cba0582a6fcfda568c38495
BLAKE2b-256 checksum
How to use checksums
836ed8a01f71cdbcc0a3fcdc1fd041ba328251449c646710be270b26c111fe8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release files / autotimeseries-0.0.7-py3-none-any.whl

Download URL autotimeseries-0.0.7-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
534ce9d62ef500265f5b3ab2a7a50306b420bcf122a982f2b62e73e6ea255fb8
BLAKE2b-256 checksum
How to use checksums
f365189bec84f24f5fa3511c55a257de46055eaf1da89f118da6d28772bad0da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Security for autotimeseries 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page