Skip to content

v0.1.18

Compare
Choose a tag to compare
@AzulGarza AzulGarza released this 10 Nov 00:23
· 224 commits to main since this release

What's Changed

🚀 Feature Enhancements

Forecast Using Diverse Models 🌐

Release of new forecasting methods. Among the updates, we've unveiled the timegpt-1-long-horizon model, crafted specifically for long-term forecasts that span multiple seasonalities. To use it, simply specify the model in your methods like so:

from nixtlats import TimeGPT

# Initialize the TimeGPT model
timegpt = TimeGPT()

# Generate forecasts using the long-horizon model
fcst_df = timegpt.forecast(..., model='timegpt-1-long-horizon')

# Perform cross-validation with the long-horizon model
cv_df = timegpt.cross_validation(..., model='timegpt-1-long-horizon')

# Detect anomalies with the long-horizon model
anomalies_df = timegpt.detect_anomalies(..., model='timegpt-1-long-horizon')

Choose between timegpt-1 for the first version of TimeGPT or timegpt-1-long-horizon for long horizon tasks..

Cross-Validation Methodology 📊

You can dive deeper into your forecasting pipelines with the new cross_validation feature. This method enables you to validate forecasts across different windows efficiently:

# Set up cross-validation with a custom horizon, number of windows, and step size
cv_df = timegpt.cross_validation(df, h=35, n_windows=5, step_size=5)

This will generate 5 distinct forecast sets, each with a horizon of 35, stepping through your data every 5 timestamps.

Retry Behavior for Robust API Calls 🔁

The new retry mechanism allows the making of more robust API calls (preventing them from crashing with large-scale tasks).

  • max_retries: Number of max retries for an API call.
  • retry_interval: Pause between retries.
  • max_wait_time: Total duration of retries.
timegpt = TimeGPT(max_retries=10, retry_interval=5, max_wait_time=360)

Token Inference Made Simple 🔑

The TimeGPT class now automatically infers your TIMEGPT_TOKEN using os.environ.get('TIMEGPT_TOKEN'), streamlining your setup:

# No more manual token handling - TimeGPT has got you covered
timegpt = TimeGPT()

For more information visit our FAQS section.

Introducing the FAQ Section 📘

Questions? We've got answers! Our new FAQ section tackles the most common inquiries, from integrating exogenous variables to configuring authorization tokens and understanding long-horizon forecasts.

Specific Changelog

New Features:

  • Add reference to pandas frequencies in PR #126
  • Add automatic evaluation workflow in PR #140
  • Retry behavior if api call fails in PR #146
  • Add support for new models (long horizon) in PR #156
  • Add cross-validation method in PR #159
  • Test correct import in CI in PR #163
  • Add colab badges to docs in PR #165

Fixes:

  • Add date features to fernignore in PR #127
  • Add new order to docs hosted in readme.com in PR #130
  • Refactor to expose endpoints in PR #132
  • Add tests for custom endpoint and abstract call api method in PR #143
  • Increase max wait time to catch ReadTimeout exception in PR #147
  • Fern-ignore new files in PR #149
  • Move docs-scripts to action_files in PR #151
  • Filter API errors in PR #155

Documentation and Miscellaneous:

  • Add CONTRIBUTING.md and mint.json in PR #135
  • Add docs scripts in PR #136
  • Checkout docs repo instead of using submodule in PR #154
  • Redirect to mintlify docs in PR #161
  • Refactor: default token to os.environ.get and remove os.environ in PR #164
  • Add faq docs in PR #166

New Contributors

Full Changelog: v0.1.17...v0.1.18