Quickstart guide to deploy and use TimeGEN-1 on Azure with the Nixtla Python SDK for time series forecasting.
TimeGEN-1 is TimeGPT optimized for Azure infrastructure. It is a production-ready generative pretrained transformer for time series, capable of accurately predicting domains such as retail, electricity, finance, and IoT with minimal code.
Azure-native generative forecasting with TimeGEN-1 for streamlined deployments.
• Demand forecasting\
• Electricity load prediction\
• Financial time series\
• IoT data analysis
Step 1: Set up a TimeGEN-1 endpoint on Azure and generate an API key
TimeGEN-1 model catalog deployment option.
Endpoint URL and API key for TimeGEN-1.
Step 2: Install Nixtla Python SDK
Install the nixtla package using pip:
Step 3: Import and instantiate the Nixtla client
Import the Nixtla client into your Python environment:
Then create a client instance using your TimeGEN-1 endpoint credentials:
Step 4: Load your time series data
In this example, we’ll use the classic AirPassengers dataset to demonstrate forecasting. The dataset shows monthly passenger counts in Australia between 1949 and 1960.
Use the Nixtla client to quickly visualize your data:
AirPassengers time series sample visualized.
Data Requirements
• Ensure the target column has no missing or non-numeric values.\
• Avoid gaps in date stamps (for the specific frequency) from the initial to final timestamp—missing dates are not automatically imputed.\
• Datestamps must be in a pandas-readable format. (See Pandas reference)
See Data Requirements for details.
Saving Figures
In most notebook environments, figures display automatically. To save a figure locally, run:
Step 5: Generate forecasts
Use the forecast
method from the Nixtla client to forecast the next 12 months.
• df
: Pandas DataFrame with time series data\
• h
: Forecast horizon (number of steps ahead)\
• freq
: Time series frequency (pandas frequency aliases)\
• time_col
: Name of timestamp column\
• target_col
: Name of forecast variable
Forecast endpoint call logs will be displayed for validation and preprocessing steps.
Forecast API Call Log
Example output:
timestamp | TimeGPT | |
---|---|---|
0 | 1961-01-01 | 437.837921 |
1 | 1961-02-01 | 426.062714 |
2 | 1961-03-01 | 463.116547 |
3 | 1961-04-01 | 478.244507 |
4 | 1961-05-01 | 505.646484 |
Visualize the forecast results:
Forecast visualization for the AirPassengers dataset.