Metadata-Version: 2.4
Name: tsagentkit-patchtst-fm
Version: 1.0.2
Summary: Granite TSFM toolkit, model wrappers, and demos for time-series forecasting workflows.
Author: IBM
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/ibm-granite/granite-tsfm
Project-URL: Repository, https://github.com/ibm-granite/granite-tsfm
Project-URL: Documentation, https://github.com/ibm-granite/granite-tsfm/wiki
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: <3.14,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas<3,>=2.2.0
Requires-Dist: scikit-learn<1.8
Requires-Dist: transformers[torch]==4.56.0
Requires-Dist: einops
Requires-Dist: datasets
Requires-Dist: deprecated
Requires-Dist: urllib3>=1.26.19
Requires-Dist: numpy<3
Requires-Dist: torch<2.9
Requires-Dist: filelock>=3.20.3
Provides-Extra: all
Requires-Dist: tsagentkit-patchtst-fm[dev,notebooks,testing]; extra == "all"
Provides-Extra: notebooks
Requires-Dist: jupyter; extra == "notebooks"
Requires-Dist: matplotlib; extra == "notebooks"
Requires-Dist: datasets; extra == "notebooks"
Requires-Dist: gluonts; extra == "notebooks"
Requires-Dist: ipywidgets; extra == "notebooks"
Requires-Dist: plotly; extra == "notebooks"
Requires-Dist: kaleido; extra == "notebooks"
Requires-Dist: tensorboard; extra == "notebooks"
Provides-Extra: testing
Requires-Dist: pytest; extra == "testing"
Requires-Dist: pytest-coverage; extra == "testing"
Requires-Dist: tsagentkit-patchtst-fm[notebooks]; extra == "testing"
Requires-Dist: parameterized; extra == "testing"
Provides-Extra: dev
Requires-Dist: tsagentkit-patchtst-fm[testing]; extra == "dev"
Requires-Dist: ruff==0.5.7; extra == "dev"
Provides-Extra: ogv
Requires-Dist: datasets; extra == "ogv"
Requires-Dist: plotly; extra == "ogv"
Requires-Dist: kaleido; extra == "ogv"
Provides-Extra: demos
Requires-Dist: tsagentkit-patchtst-fm[notebooks]; extra == "demos"
Requires-Dist: streamlit; extra == "demos"
Requires-Dist: altair<5; extra == "demos"
Requires-Dist: plotly; extra == "demos"
Requires-Dist: streamlit-aggrid; extra == "demos"
Requires-Dist: kaleido; extra == "demos"
Requires-Dist: toml; extra == "demos"
Dynamic: license-file

# TSFM: Time Series Foundation Models
Public notebooks, utilities, and serving components for working with Time Series Foundation Models (TSFM).

The core TSFM time series models have been made available on Hugging Face -- details can be found 
[here](https://github.com/ibm-granite/granite-tsfm/wiki). Information on the services component can be found [here](https://github.com/ibm-granite/granite-tsfm/blob/main/services/inference/README.md).

## Python Version
The current Python versions supported are 3.11, 3.12, 3.13.

## Install From PyPI
Install the package directly from PyPI:

```bash
pip install tsagentkit-patchtst-fm
```

For notebook extras:

```bash
pip install "tsagentkit-patchtst-fm[notebooks]"
```

## Initial Setup
First clone the repository:
```bash
git clone "https://github.com/ibm-granite/granite-tsfm.git" 
cd granite-tsfm
```

## 📕 Notebooks Installation
Several notebooks are provided in the `notebooks` folder. They allow you to perform pre-training and finetuning on the models.
To install use `pip`:

```bash
pip install ".[notebooks]"
```

### 🔗 Links to the notebooks
- Getting started with `PatchTSMixer` [[Try it out]](https://github.com/ibm-granite/granite-tsfm/blob/main/notebooks/hfdemo/patch_tsmixer_getting_started.ipynb)
- Transfer learning with `PatchTSMixer` [[Try it out]](https://github.com/ibm-granite/granite-tsfm/blob/main/notebooks/hfdemo/patch_tsmixer_transfer.ipynb)
- Transfer learning with `PatchTST` [[Try it out]](https://github.com/ibm-granite/granite-tsfm/blob/main/notebooks/hfdemo/patch_tst_transfer.ipynb)
- Getting started with `TinyTimeMixer (TTM)` [[Try it out]](https://github.com/ibm-granite/granite-tsfm/blob/main/notebooks/hfdemo/ttm_getting_started.ipynb)
- `TTM` full benchmarking scripts and results are available [[here]](https://github.com/ibm-granite/granite-tsfm/tree/main/notebooks/hfdemo/tinytimemixer/full_benchmarking)

## 📗 Google Colab Tutorials
Run the TTM tutorial in Google Colab, and quickly build a forecasting application with the pre-trained TSFM models.
- [TTM Colab Tutorial](https://colab.research.google.com/github/ibm-granite/granite-tsfm/blob/main/notebooks/hfdemo/ttm_getting_started.ipynb) 

## 💻 Demos Installation
The demo presented at NeurIPS 2023 is available in `tsfmhfdemos`. This demo requires you to have pre-trained and finetuned models in place (we plan to release these at a later date). To install the requirements use `pip`:

```bash
pip install ".[demos]"
```

## 🪲 Issues
If you encounter an issue with this project, you are welcome to submit a [bug report](https://github.com/ibm-granite/granite-tsfm/issues).
Before opening a new issue, please search for similar issues. It's possible that someone has already reported it.

## 🌏 Wiki 
[Wiki Page](https://github.com/ibm-granite/granite-tsfm/wiki)

# Notice
The intention of this repository is to make it easier to use and demonstrate Granite TimeSeries components that have been made available in the [Hugging Face transformers library](https://huggingface.co/docs/transformers/main/en/index). As we continue to develop these capabilities we will update the code here.


IBM Public Repository Disclosure: All content in this repository including code has been provided by IBM under the associated open source software license and IBM is under no obligation to provide enhancements, updates, or support. IBM developers produced this code as an open source project (not as an IBM product), and IBM makes no assertions as to the level of quality nor security, and will not be maintaining this code going forward.
