Skip to content

Commit

Permalink
Merge pull request #113 from ajati/plot-fix2
Browse files Browse the repository at this point in the history
Plot fixes and minor readme fixes
  • Loading branch information
wgifford authored Aug 21, 2024
2 parents cb3982e + 224d683 commit 2021c10
Show file tree
Hide file tree
Showing 4 changed files with 261 additions and 106 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The core TSFM time series models have been made available on Hugging Face -- det
[here](wiki.md). Information on the services component can be found [here](services/inference/README.md).


# Python Version
## Python Version
The current Python versions supported are 3.9, 3.10, 3.11.

## Initial Setup
Expand All @@ -23,13 +23,13 @@ To install use `pip`:
pip install ".[notebooks]"
```

### Notebooks links
### 🔗 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)

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

Expand All @@ -40,10 +40,12 @@ The demo presented at NeurIPS 2023 is available in `tsfmhfdemos`. This demo requ
pip install ".[demos]"
```

## Issues
## 🪲 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](wiki.md)

# 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.
Expand Down
251 changes: 178 additions & 73 deletions notebooks/hfdemo/tinytimemixer/ttm_m4_hourly.ipynb

Large diffs are not rendered by default.

102 changes: 73 additions & 29 deletions notebooks/hfdemo/ttm_getting_started.ipynb

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions tsfm_public/toolkit/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,11 @@ def plot_predictions(
plt.style.use("seaborn-v0_8-whitegrid")

# Adjust figure size and subplot spacing
assert num_plots >= 1
fig, axs = plt.subplots(num_plots, 1, figsize=(10, 2 * num_plots))
if num_plots == 1:
axs = [axs]

for i, ri in enumerate(random_indices):
batch = dset[ri]

Expand Down

0 comments on commit 2021c10

Please sign in to comment.