ibm-granite / granite-tsfm

Foundation Models for Time Series
Apache License 2.0
420 stars 184 forks source link

How to train? #144

Open wtt6668888 opened 1 month ago

wtt6668888 commented 1 month ago

How should the provided code be applied to your own dataset for training and prediction?

fayvor commented 1 month ago

Hi @wtt6668888, here are a couple of notebooks that may be of use to you. Your dataset will need to be parseable into a pandas dataframe with a time column and a target column for prediction. Please let me know if this helps answer your question. Energy Demand Forecasting - Basic Inference Preprocessing and Performance Evaluation

wgifford commented 1 month ago

@wtt6668888 For pretraining a new model from scratch you can take a look at the workflow here: https://github.com/ibm-granite/granite-tsfm/blob/main/notebooks/hfdemo/tinytimemixer/ttm_pretrain_sample.py

If you wish to fine-tune the pretrained model, you can take a look at the following notebook: https://github.com/ibm-granite/granite-tsfm/blob/main/notebooks/tutorial/ttm_with_exog_tutorial.ipynb

This notebook fine-tunes the model so that additional exogenous features can be included.