Skip to content

Commit

Permalink
Merge pull request #37 from IBM/ttm_preadme_fix
Browse files Browse the repository at this point in the history
Ttm readme link fix
  • Loading branch information
wgifford authored Apr 9, 2024
2 parents 8c8e54e + 75b9965 commit 2d07f49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions notebooks/hfdemo/tinytimemixer/ttm_pretrain_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
# Have a look at the fine-tune scripts for example usecases of the pre-trained
# TTM models.

# Basic usage:
# python ttm_pretrain_sample.py --data_root_path datasets/
# See the get_ttm_args() function to know more about other TTM arguments

# Standard
import math
import os
Expand All @@ -24,8 +28,6 @@
TinyTimeMixerConfig,
TinyTimeMixerForPrediction,
)

# First Party
from tsfm_public.models.tinytimemixer.utils import get_data, get_ttm_args


Expand Down Expand Up @@ -138,7 +140,10 @@ def pretrain(args, model, dset_train, dset_val):

# Data prep
dset_train, dset_val, dset_test = get_data(
args.dataset, args.context_length, args.forecast_length, data_root_path=args.data_root_path
args.dataset,
args.context_length,
args.forecast_length,
data_root_path=args.data_root_path,
)
print("Length of the train dataset =", len(dset_train))

Expand Down
2 changes: 1 addition & 1 deletion tsfm_public/models/tinytimemixer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ For Installation steps, refer [here](https://github.com/IBM/tsfm/tree/ttm)
- Illustration notebook for 512-96 model on the considered target datasets: [here](../../../notebooks/hfdemo/tinytimemixer/ttm_benchmarking_512_96.ipynb)
- Illustration notebook for 1024-96 model on the considered target datasets: [here](../../../notebooks/hfdemo/tinytimemixer/ttm_benchmarking_1024_96.ipynb)
- M4-hourly transfer learning example: [here](../../../notebooks/hfdemo/tinytimemixer/ttm_m4_hourly.ipynb)
- Sample pretraining script: [here](../../../notebooks/hfdemo/tinytimemixer/ttm_pretrain_sample.py.ipynb)
- Sample pretraining script: [here](../../../notebooks/hfdemo/tinytimemixer/ttm_pretrain_sample.py)



Expand Down

0 comments on commit 2d07f49

Please sign in to comment.