Dask
Run TimeGPT in a distributed manner using Dask for scalable forecasting.
Dask is an open-source parallel computing library for Python. This guide explains how to use TimeGPT from Nixtla with Dask for distributed forecasting tasks.
Highlights
• Simplify distributed computing with Fugue.
• Run TimeGPT at scale on a Dask cluster.
• Seamlessly convert pandas DataFrames to Dask.
Outline
Step 1: Installation
Step 2: Load Your Data
You can start by loading data into a pandas DataFrame. In this example, we use hourly electricity prices from multiple markets:
Step 3: Import Dask
Convert the pandas DataFrame into a Dask DataFrame for parallel processing.
When converting to a Dask DataFrame, you can specify the number of partitions based on your data size or system resources.
Step 4: Use TimeGPT on Dask
To use TimeGPT with Dask, provide a Dask DataFrame to Nixtla’s client methods instead of a pandas DataFrame.
Important Concept: NixtlaClient
Instantiate the NixtlaClient
class to interact with Nixtla’s API.
You can use any method from the NixtlaClient
, such as forecast
or cross_validation
.
TimeGPT with Dask also supports exogenous variables. Refer to the Exogenous Variables Tutorial for details. Substitute pandas DataFrames with Dask DataFrames as needed.