Instructions to use amazon/chronos-t5-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Chronos
How to use amazon/chronos-t5-small with Chronos:
pip install chronos-forecasting
import pandas as pd from chronos import BaseChronosPipeline pipeline = BaseChronosPipeline.from_pretrained("amazon/chronos-t5-small", device_map="cuda") # Load historical data context_df = pd.read_csv("https://autogluon.s3.us-west-2.amazonaws.com/datasets/timeseries/misc/AirPassengers.csv") # Generate predictions pred_df = pipeline.predict_df( context_df, prediction_length=36, # Number of steps to forecast quantile_levels=[0.1, 0.5, 0.9], # Quantiles for probabilistic forecast id_column="item_id", # Column identifying different time series timestamp_column="Month", # Column with datetime information target="#Passengers", # Column(s) with time series values to predict ) - Notebooks
- Google Colab
- Kaggle
Amazon Chronos T5 Small Forecasting Google Colab Notebook
Hi Everyone,
I am sharing this in case it is helpful, I created a Google Colab Notebook which enables testing of Chronos T5 small on small datasets for forecasting, all you need is a csv file with some data in to get started (or even if you don't have that I've provided some you can use).
Colab Notebook: https://github.com/smartaces/amazon-chronos-t5-sales-forecasting
Video walkthrough of Notebook: https://www.youtube.com/watch?v=jyrOmIiI2Bc&t=103s
I also created a series of inputs to make it easy to set forcast period lengths and intervals.
The notebook also allows for comparison against actual datasets (via csv upload), so you can see how accurate the forecasts are.
Basically this makes it super simple to test the awesomeness of Chronos.
All outputs are exported as csv file as well.
I am a big fan of this model, and have seen some really great results even with T5 small, hitting +90% accuracy.
All the best
J
Great work
I am wondering it it can be used for anomaly detection, like TimeGPT can. Do you know if there are examples of using chronos, or any other of the HF time series foundation models, that can perform anomaly detection?