Skip to content

Commit

Permalink
v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AzulGarza committed Apr 3, 2024
1 parent 9ca4ce3 commit 3ac106b
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 6 deletions.
67 changes: 67 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,72 @@
# Changelog

## 0.3.0

### 🔄 Changes & Deprecations

- **Deprecation of `TimeGPT` Class:**
In an effort to streamline our API and align with industry best practices, we're deprecating the `TimeGPT` class in favor of the new `NixtlaClient` class. This change is designed to provide a more intuitive and powerful interface for interacting with our services.

**Before:**
```python
from nixtlats import TimeGPT

# Initialize the TimeGPT model
timegpt = TimeGPT()
```

**After:**
```python
from nixtlats import NixtlaClient

# Initialize the NixtlaClient
nixtla = NixtlaClient()
```

- **Renaming of Configuration Parameters:**
To enhance clarity and consistency with other SDKs, we've renamed the `token` parameter to `api_key` and `environment` to `base_url`.

**Before:**
```python
timegpt = TimeGPT(token='YOUR_TOKEN', environment='YOUR_ENVIRONMENT_URL')
```

**After:**
```python
nixtla = NixtlaClient(api_key='YOUR_API_KEY', base_url='YOUR_BASE_URL')
```

- **Introduction of `NixtlaClient.validate_api_key`:**
Replacing the previous `NixtlaClient.validate_token` method, this update aligns with the new authentication parameter naming and offers a straightforward way to validate API keys.

**Before:**
```python
timegpt.validate_token()
```

**After:**
```python
nixtla.validate_api_key()
```

- **Environment Variable Changes:**
In line with the renaming of parameters, we've updated the environment variables to set up the API key and base URL. The `TIMEGPT_TOKEN` is now replaced with `NIXTLA_API_KEY`, and we've introduced `NIXTLA_BASE_URL` for custom API URLs.

#### **Backward Compatibility & Future Warnings:**

These changes are designed to be backward compatible. However, users can expect to see future warnings when utilizing deprecated features, such as the `TimeGPT` class.

*See full changelog [here](https://github.com/Nixtla/nixtla/releases/v0.3.0).*

## 0.2.0 (Previously Released)

### 🔄 Changes & Deprecations

- **Renaming of Fine-Tuning Parameters:**
The `finetune_steps` and `finetune_loss` parameters were renamed to `fewshot_steps` and `fewshot_loss`. Additionally, the model parameter values changed from `short-horizon` and `long-horizon` to `timegpt-1` and `timegpt-1-long-horizon`, with an emphasis on preserving backward compatibility. In version 0.3.0, these changes are deprecated in favor of reverting to the original parameter names and values, ensuring a seamless transition for existing users.

*See full changelog [here](https://github.com/Nixtla/nixtla/releases/v0.2.0).*

## 0.1.21

### 🚀 Feature Enhancements
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ Get started with TimeGPT now:
df = pd.read_csv('https://raw.githubusercontent.com/Nixtla/transfer-learning-time-series/main/datasets/electricity-short.csv')

from nixtlats import NixtlaClient
nixtla_client = NixtlaClient(
nixtla = NixtlaClient(
# defaults to os.environ.get("NIXTLA_API_KEY")
api_key = 'my_api_key_provided_by_nixtla'
)
fcst_df = nixtla_client.forecast(df, h=24, level=[80, 90])
fcst_df = nixtla.forecast(df, h=24, level=[80, 90])
```

![](./nbs/img/forecast_readme.png)
2 changes: 1 addition & 1 deletion nixtlats/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "0.2.0"
__version__ = "0.3.0"
__all__ = ["TimeGPT"]
from .nixtla_client import NixtlaClient, TimeGPT
2 changes: 1 addition & 1 deletion settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ author = Nixtla
author_email = [email protected]
copyright = Nixtla Inc.
branch = main
version = 0.2.0
version = 0.3.0
min_python = 3.8
audience = Developers
language = English
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

setuptools.setup(
name="nixtlats",
version="0.2.0",
description="TimeGPT SDK",
version="0.3.0",
description="Python SDK for Nixtla API (TimeGPT)",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Nixtla/nixtla",
Expand Down

0 comments on commit 3ac106b

Please sign in to comment.