From 7d863b2b19e43a9a5397f334a00c85d86165e359 Mon Sep 17 00:00:00 2001 From: Wesley Gifford <79663411+wgifford@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:22:57 -0500 Subject: [PATCH 1/2] point to new test model location --- services/finetuning/Makefile | 2 +- services/inference/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/finetuning/Makefile b/services/finetuning/Makefile index 3085c85..6c15f0c 100644 --- a/services/finetuning/Makefile +++ b/services/finetuning/Makefile @@ -16,7 +16,7 @@ image: clone_models: git lfs install || true - git clone https://huggingface.co/ibm/test-tsfm mytest-tsfm || true + git clone https://huggingface.co/ibm-research/test-tsfm mytest-tsfm || true fetchdata: diff --git a/services/inference/Makefile b/services/inference/Makefile index cbc95df..e2ea579 100644 --- a/services/inference/Makefile +++ b/services/inference/Makefile @@ -64,7 +64,7 @@ install_dev: boilerplate clone_models: git lfs install || true - git clone https://huggingface.co/ibm/test-tsfm mytest-tsfm || true + git clone https://huggingface.co/ibm-research/test-tsfm mytest-tsfm || true delete_models: rm -rf mytest-tsfm || true From 76f492bc0e28efb59cbfd399ccd68704edfd131e Mon Sep 17 00:00:00 2001 From: Wesley Gifford <79663411+wgifford@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:32:58 -0500 Subject: [PATCH 2/2] use ibm-research hf org --- .../foundts_leaderboard/ttm-b1-512.sh | 2 +- .../full_benchmarking/research-use-r2.sh | 2 +- .../ttm-r2_freq_benchmarking_1024_96.ipynb | 4 ++-- .../ttm-r2_freq_benchmarking_1536_96.ipynb | 6 ++--- .../ttm-r2_freq_benchmarking_512_96.ipynb | 6 ++--- .../ttm-r1_benchmarking_1024_96.ipynb | 2 +- .../ttm-r1_benchmarking_512_96.ipynb | 2 +- .../ttm-r2_benchmarking_1024_96.ipynb | 2 +- .../ttm-r2_benchmarking_512_96.ipynb | 2 +- .../ttm_full_benchmarking.py | 2 +- notebooks/hfdemo/ttm_getting_started.ipynb | 6 ++--- tests/toolkit/test_get_model.py | 4 ++-- .../resources/model_paths_config/ttm.yaml | 24 +++++++++---------- tsfm_public/toolkit/get_model.py | 6 ++--- 14 files changed, 35 insertions(+), 35 deletions(-) diff --git a/notebooks/hfdemo/tinytimemixer/full_benchmarking/foundts_leaderboard/ttm-b1-512.sh b/notebooks/hfdemo/tinytimemixer/full_benchmarking/foundts_leaderboard/ttm-b1-512.sh index 7d69296..8b10c2b 100644 --- a/notebooks/hfdemo/tinytimemixer/full_benchmarking/foundts_leaderboard/ttm-b1-512.sh +++ b/notebooks/hfdemo/tinytimemixer/full_benchmarking/foundts_leaderboard/ttm-b1-512.sh @@ -2,7 +2,7 @@ data_root_path=$1 for cl in 512; do for fl in 96 192 336 720; do python ../ttm_full_benchmarking.py --context_length $cl --forecast_length $fl --num_epochs 50 --num_workers 16 \ - --hf_model_path ibm/ttm-research-r2 \ + --hf_model_path ibm-research/ttm-research-r2 \ --data_root_path $data_root_path \ --fewshot 0 \ --plot 0 \ diff --git a/notebooks/hfdemo/tinytimemixer/full_benchmarking/research-use-r2.sh b/notebooks/hfdemo/tinytimemixer/full_benchmarking/research-use-r2.sh index 3897f73..a58bd57 100644 --- a/notebooks/hfdemo/tinytimemixer/full_benchmarking/research-use-r2.sh +++ b/notebooks/hfdemo/tinytimemixer/full_benchmarking/research-use-r2.sh @@ -3,7 +3,7 @@ for cl in 512 1024 1536; do for fl in 96 192 336 720; do python ttm_full_benchmarking.py --context_length $cl --forecast_length $fl \ --num_epochs 50 --num_workers 16 --enable_prefix_tuning 1 \ - --hf_model_path ibm/ttm-research-r2 \ + --hf_model_path ibm-research/ttm-research-r2 \ --data_root_path $data_root_path \ --save_dir results-research-use-r2/ done; diff --git a/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/research_use/ttm-r2_freq_benchmarking_1024_96.ipynb b/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/research_use/ttm-r2_freq_benchmarking_1024_96.ipynb index 2430f7d..9ff87aa 100644 --- a/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/research_use/ttm-r2_freq_benchmarking_1024_96.ipynb +++ b/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/research_use/ttm-r2_freq_benchmarking_1024_96.ipynb @@ -132,14 +132,14 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# TTM models for Only Research and Academic (Non-Commercial) Use are here: https://huggingface.co/ibm/ttm-research-r2\n", "# Please provide the branch name properly based on context_len and forecast_len\n", "\n", - "hf_model_path = \"ibm/ttm-research-r2\"\n", + "hf_model_path = \"ibm-research/ttm-research-r2\"\n", "if context_length == 512:\n", " hf_model_branch = \"main\"\n", "elif context_length == 1024 or context_length == 1536:\n", diff --git a/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/research_use/ttm-r2_freq_benchmarking_1536_96.ipynb b/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/research_use/ttm-r2_freq_benchmarking_1536_96.ipynb index d7bf2cc..9b0e1b1 100644 --- a/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/research_use/ttm-r2_freq_benchmarking_1536_96.ipynb +++ b/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/research_use/ttm-r2_freq_benchmarking_1536_96.ipynb @@ -132,14 +132,14 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "# TTM models for Only Research and Academic (Non-Commercial) Use are here: https://huggingface.co/ibm/ttm-research-r2\n", + "# TTM models for Only Research and Academic (Non-Commercial) Use are here: https://huggingface.co/ibm-research/ttm-research-r2\n", "# Please provide the branch name properly based on context_len and forecast_len\n", "\n", - "hf_model_path = \"ibm/ttm-research-r2\"\n", + "hf_model_path = \"ibm-research/ttm-research-r2\"\n", "if context_length == 512:\n", " hf_model_branch = \"main\"\n", "elif context_length == 1024 or context_length == 1536:\n", diff --git a/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/research_use/ttm-r2_freq_benchmarking_512_96.ipynb b/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/research_use/ttm-r2_freq_benchmarking_512_96.ipynb index 9913336..3f543e7 100644 --- a/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/research_use/ttm-r2_freq_benchmarking_512_96.ipynb +++ b/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/research_use/ttm-r2_freq_benchmarking_512_96.ipynb @@ -132,14 +132,14 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "# TTM models for Only Research and Academic (Non-Commercial) Use are here: https://huggingface.co/ibm/ttm-research-r2\n", + "# TTM models for Only Research and Academic (Non-Commercial) Use are here: https://huggingface.co/ibm-research/ttm-research-r2\n", "# Please provide the branch name properly based on context_len and forecast_len\n", "\n", - "hf_model_path = \"ibm/ttm-research-r2\"\n", + "hf_model_path = \"ibm-research/ttm-research-r2\"\n", "if context_length == 512:\n", " hf_model_branch = \"main\"\n", "elif context_length == 1024 or context_length == 1536:\n", diff --git a/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r1_benchmarking_1024_96.ipynb b/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r1_benchmarking_1024_96.ipynb index 9c1889f..0c3bbbc 100644 --- a/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r1_benchmarking_1024_96.ipynb +++ b/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r1_benchmarking_1024_96.ipynb @@ -15,7 +15,7 @@ "\n", "1. IBM Granite TTM-R1 pre-trained models can be found here: [Granite-TTM-R1 Model Card](https://huggingface.co/ibm-granite/granite-timeseries-ttm-r1)\n", "2. IBM Granite TTM-R2 pre-trained models can be found here: [Granite-TTM-R2 Model Card](https://huggingface.co/ibm-granite/granite-timeseries-ttm-r2)\n", - "3. Research-use (non-commercial use only) TTM-R2 pre-trained models can be found here: [Research-Use-TTM-R2](https://huggingface.co/ibm/ttm-research-r2)" + "3. Research-use (non-commercial use only) TTM-R2 pre-trained models can be found here: [Research-Use-TTM-R2](https://huggingface.co/ibm-research/ttm-research-r2)" ] }, { diff --git a/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r1_benchmarking_512_96.ipynb b/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r1_benchmarking_512_96.ipynb index b1ea36c..7dede10 100644 --- a/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r1_benchmarking_512_96.ipynb +++ b/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r1_benchmarking_512_96.ipynb @@ -15,7 +15,7 @@ "\n", "1. IBM Granite TTM-R1 pre-trained models can be found here: [Granite-TTM-R1 Model Card](https://huggingface.co/ibm-granite/granite-timeseries-ttm-r1)\n", "2. IBM Granite TTM-R2 pre-trained models can be found here: [Granite-TTM-R2 Model Card](https://huggingface.co/ibm-granite/granite-timeseries-ttm-r2)\n", - "3. Research-use (non-commercial use only) TTM-R2 pre-trained models can be found here: [Research-Use-TTM-R2](https://huggingface.co/ibm/ttm-research-r2)" + "3. Research-use (non-commercial use only) TTM-R2 pre-trained models can be found here: [Research-Use-TTM-R2](https://huggingface.co/ibm-research/ttm-research-r2)" ] }, { diff --git a/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r2_benchmarking_1024_96.ipynb b/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r2_benchmarking_1024_96.ipynb index 44c31b5..06d40ce 100644 --- a/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r2_benchmarking_1024_96.ipynb +++ b/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r2_benchmarking_1024_96.ipynb @@ -15,7 +15,7 @@ "\n", "1. IBM Granite TTM-R1 pre-trained models can be found here: [Granite-TTM-R1 Model Card](https://huggingface.co/ibm-granite/granite-timeseries-ttm-r1)\n", "2. IBM Granite TTM-R2 pre-trained models can be found here: [Granite-TTM-R2 Model Card](https://huggingface.co/ibm-granite/granite-timeseries-ttm-r2)\n", - "3. Research-use (non-commercial use only) TTM-R2 pre-trained models can be found here: [Research-Use-TTM-R2](https://huggingface.co/ibm/ttm-research-r2)" + "3. Research-use (non-commercial use only) TTM-R2 pre-trained models can be found here: [Research-Use-TTM-R2](https://huggingface.co/ibm-research/ttm-research-r2)" ] }, { diff --git a/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r2_benchmarking_512_96.ipynb b/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r2_benchmarking_512_96.ipynb index dff3a8d..2317ff0 100644 --- a/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r2_benchmarking_512_96.ipynb +++ b/notebooks/hfdemo/tinytimemixer/full_benchmarking/sample_notebooks/ttm-r2_benchmarking_512_96.ipynb @@ -15,7 +15,7 @@ "\n", "1. IBM Granite TTM-R1 pre-trained models can be found here: [Granite-TTM-R1 Model Card](https://huggingface.co/ibm-granite/granite-timeseries-ttm-r1)\n", "2. IBM Granite TTM-R2 pre-trained models can be found here: [Granite-TTM-R2 Model Card](https://huggingface.co/ibm-granite/granite-timeseries-ttm-r2)\n", - "3. Research-use (non-commercial use only) TTM-R2 pre-trained models can be found here: [Research-Use-TTM-R2](https://huggingface.co/ibm/ttm-research-r2)" + "3. Research-use (non-commercial use only) TTM-R2 pre-trained models can be found here: [Research-Use-TTM-R2](https://huggingface.co/ibm-research/ttm-research-r2)" ] }, { diff --git a/notebooks/hfdemo/tinytimemixer/full_benchmarking/ttm_full_benchmarking.py b/notebooks/hfdemo/tinytimemixer/full_benchmarking/ttm_full_benchmarking.py index 776d891..1b3eae8 100644 --- a/notebooks/hfdemo/tinytimemixer/full_benchmarking/ttm_full_benchmarking.py +++ b/notebooks/hfdemo/tinytimemixer/full_benchmarking/ttm_full_benchmarking.py @@ -4,7 +4,7 @@ 1. TTM-Granite-R1 pre-trained models can be found here: [TTM-R1 Model Card](https://huggingface.co/ibm-granite/granite-timeseries-ttm-r1) 2. TTM-Granite-R2 pre-trained models can be found here: [TTM-R2 Model Card](https://huggingface.co/ibm-granite/granite-timeseries-ttm-r2) -3. TTM-Research-Use pre-trained models can be found here: [TTM-Research-Use Model Card](https://huggingface.co/ibm/ttm-research-r2) +3. TTM-Research-Use pre-trained models can be found here: [TTM-Research-Use Model Card](https://huggingface.co/ibm-research/ttm-research-r2) Every model card has a suite of TTM models. Please read the respective model cards for usage instructions. """ diff --git a/notebooks/hfdemo/ttm_getting_started.ipynb b/notebooks/hfdemo/ttm_getting_started.ipynb index c6ba4e5..41d9919 100644 --- a/notebooks/hfdemo/ttm_getting_started.ipynb +++ b/notebooks/hfdemo/ttm_getting_started.ipynb @@ -18,7 +18,7 @@ "\n", "1. IBM Granite TTM-R1 pre-trained models can be found here: [Granite-TTM-R1 Model Card](https://huggingface.co/ibm-granite/granite-timeseries-ttm-r1)\n", "2. IBM Granite TTM-R2 pre-trained models can be found here: [Granite-TTM-R2 Model Card](https://huggingface.co/ibm-granite/granite-timeseries-ttm-r2)\n", - "3. Research-use (non-commercial use only) TTM-R2 pre-trained models can be found here: [Research-Use-TTM-R2](https://huggingface.co/ibm/ttm-research-r2)" + "3. Research-use (non-commercial use only) TTM-R2 pre-trained models can be found here: [Research-Use-TTM-R2](https://huggingface.co/ibm-research/ttm-research-r2)" ] }, { @@ -283,7 +283,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "a826c4f3-1c6c-4088-b6af-f430f45fd380", "metadata": {}, "outputs": [], @@ -295,7 +295,7 @@ "# TTM Model path. The default model path is Granite-R2. Below, you can choose other TTM releases.\n", "TTM_MODEL_PATH = \"ibm-granite/granite-timeseries-ttm-r2\"\n", "# TTM_MODEL_PATH = \"ibm-granite/granite-timeseries-ttm-r1\"\n", - "# TTM_MODEL_PATH = \"ibm/ttm-research-r2\"\n", + "# TTM_MODEL_PATH = \"ibm-research/ttm-research-r2\"\n", "\n", "# Context length, Or Length of the history.\n", "# Currently supported values are: 512/1024/1536 for Granite-TTM-R2 and Research-Use-TTM-R2, and 512/1024 for Granite-TTM-R1\n", diff --git a/tests/toolkit/test_get_model.py b/tests/toolkit/test_get_model.py index 76eda98..9a0f8b3 100644 --- a/tests/toolkit/test_get_model.py +++ b/tests/toolkit/test_get_model.py @@ -60,14 +60,14 @@ def test_get_model(): assert model.config.prediction_length == fl assert model.config.context_length == cl - mp = "ibm/ttm-research-r2" + mp = "ibm-research/ttm-research-r2" for cl in [512, 1024, 1536]: for fl in [96, 192, 336, 720]: model = get_model(model_path=mp, context_length=cl, prediction_length=fl) assert model.config.prediction_length == fl assert model.config.context_length == cl - mp = "ibm/ttm-research-r2" + mp = "ibm-research/ttm-research-r2" for cl in range(1, 2000, 500): for fl in range(1, 900, 90): model = get_model(model_path=mp, context_length=cl, prediction_length=fl) diff --git a/tsfm_public/resources/model_paths_config/ttm.yaml b/tsfm_public/resources/model_paths_config/ttm.yaml index 14accdd..f361d70 100644 --- a/tsfm_public/resources/model_paths_config/ttm.yaml +++ b/tsfm_public/resources/model_paths_config/ttm.yaml @@ -88,73 +88,73 @@ ibm-granite-models: research-use-models: r2-512-96-freq: release: r2 - model_card: ibm/ttm-research-r2 + model_card: ibm-research/ttm-research-r2 revision: main context_length: 512 prediction_length: 96 r2-512-192-freq: release: r2 - model_card: ibm/ttm-research-r2 + model_card: ibm-research/ttm-research-r2 revision: 512-192-ft-r2 context_length: 512 prediction_length: 192 r2-512-336-freq: release: r2 - model_card: ibm/ttm-research-r2 + model_card: ibm-research/ttm-research-r2 revision: 512-336-ft-r2 context_length: 512 prediction_length: 336 r2-512-720-freq: release: r2 - model_card: ibm/ttm-research-r2 + model_card: ibm-research/ttm-research-r2 revision: 512-720-ft-r2 context_length: 512 prediction_length: 720 r2-1024-96-freq: release: r2 - model_card: ibm/ttm-research-r2 + model_card: ibm-research/ttm-research-r2 revision: 1024-96-ft-r2 context_length: 1024 prediction_length: 96 r2-1024-192-freq: release: r2 - model_card: ibm/ttm-research-r2 + model_card: ibm-research/ttm-research-r2 revision: 1024-192-ft-r2 context_length: 1024 prediction_length: 192 r2-1024-336-freq: release: r2 - model_card: ibm/ttm-research-r2 + model_card: ibm-research/ttm-research-r2 revision: 1024-336-ft-r2 context_length: 1024 prediction_length: 336 r2-1024-720-freq: release: r2 - model_card: ibm/ttm-research-r2 + model_card: ibm-research/ttm-research-r2 revision: 1024-720-ft-r2 context_length: 1024 prediction_length: 720 r2-1536-96-freq: release: r2 - model_card: ibm/ttm-research-r2 + model_card: ibm-research/ttm-research-r2 revision: 1536-96-ft-r2 context_length: 1536 prediction_length: 96 r2-1536-192-freq: release: r2 - model_card: ibm/ttm-research-r2 + model_card: ibm-research/ttm-research-r2 revision: 1536-192-ft-r2 context_length: 1536 prediction_length: 192 r2-1536-336-freq: release: r2 - model_card: ibm/ttm-research-r2 + model_card: ibm-research/ttm-research-r2 revision: 1536-336-ft-r2 context_length: 1536 prediction_length: 336 r2-1536-720-freq: release: r2 - model_card: ibm/ttm-research-r2 + model_card: ibm-research/ttm-research-r2 revision: 1536-720-ft-r2 context_length: 1536 prediction_length: 720 \ No newline at end of file diff --git a/tsfm_public/toolkit/get_model.py b/tsfm_public/toolkit/get_model.py index bfb9a71..56a76c5 100644 --- a/tsfm_public/toolkit/get_model.py +++ b/tsfm_public/toolkit/get_model.py @@ -36,7 +36,7 @@ def check_ttm_model_path(model_path): return 1 elif "ibm-granite/granite-timeseries-ttm-r2" in model_path: return 2 - elif "ibm/ttm-research-r2" in model_path: + elif "ibm-research/ttm-research-r2" in model_path: return 3 else: return 0 @@ -63,10 +63,10 @@ def get_model( model name to use. Allowed values: ttm context_length (int): Input Context length. For ibm-granite/granite-timeseries-ttm-r1, we allow 512 and 1024. - For ibm-granite/granite-timeseries-ttm-r2 and ibm/ttm-research-r2, we allow 512, 1024 and 1536 + For ibm-granite/granite-timeseries-ttm-r2 and ibm-research/ttm-research-r2, we allow 512, 1024 and 1536 prediction_length (int): Forecast length to predict. For ibm-granite/granite-timeseries-ttm-r1, we can forecast upto 96. - For ibm-granite/granite-timeseries-ttm-r2 and ibm/ttm-research-r2, we can forecast upto 720. + For ibm-granite/granite-timeseries-ttm-r2 and ibm-research/ttm-research-r2, we can forecast upto 720. Model is trained for fixed forecast lengths (96,192,336,720) and this model add required `prediction_filter_length` to the model instance for required pruning. For Ex. if we need to forecast 150 timepoints given last 512 timepoints using model_path = ibm-granite/granite-timeseries-ttm-r2, then get_model will select the model from 512_192_r2 branch and applies prediction_filter_length = 150 to prune the forecasts from 192 to 150. prediction_filter_length also applies loss