diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml
index 05ada96..e94f5b5 100644
--- a/.github/workflows/static-analysis.yml
+++ b/.github/workflows/static-analysis.yml
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
name: Static Analysis
diff --git a/.gitignore b/.gitignore
index b397a0b..7c660ca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,9 @@
+# This source file is part of the OpenTSLM open-source project
+#
+# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+#
+# SPDX-License-Identifier: MIT
+
venv
__pycache__
.DS_STORE
diff --git a/.gitmodules b/.gitmodules
index d32896a..a27cc5d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,9 @@
+# This source file is part of the OpenTSLM open-source project
+#
+# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+#
+# SPDX-License-Identifier: MIT
+
[submodule "open_flamingo"]
path = open_flamingo
url = https://github.com/mlfoundations/open_flamingo.git
diff --git a/.linkspector.yml b/.linkspector.yml
index 9de8111..05471bf 100644
--- a/.linkspector.yml
+++ b/.linkspector.yml
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
dirs:
- .
diff --git a/.reuse/templates/opentslm.jinja2 b/.reuse/templates/opentslm.jinja2
new file mode 100644
index 0000000..17928cd
--- /dev/null
+++ b/.reuse/templates/opentslm.jinja2
@@ -0,0 +1,9 @@
+This source file is part of the OpenTSLM open-source project
+
+{% for line in copyright_lines %}
+{{ line }}
+{% endfor %}
+
+{% for expr in spdx_expressions %}
+SPDX-License-Identifier: {{ expr }}
+{% endfor %}
\ No newline at end of file
diff --git a/README.md b/README.md
index ebabd3b..88abc42 100644
--- a/README.md
+++ b/README.md
@@ -335,6 +335,19 @@ For researchers and project partners interested in collaboration opportunities,
This project is licensed under the MIT License.
+We use the [REUSE specification](https://reuse.software/spec/) to ensure consistent and machine-readable licensing across the repository.
+
+To add or update license headers, run:
+
+```bash
+reuse annotate --recursive \
+ --template opentslm \
+ --copyright "Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)" \
+ --license MIT \
+ --skip-unrecognised \
+ .
+```
+

diff --git a/REUSE.toml b/REUSE.toml
index 699a366..9016f08 100644
--- a/REUSE.toml
+++ b/REUSE.toml
@@ -1,6 +1,6 @@
version = 1
[[annotations]]
-path = ["assets/**", "data/**", "**/*.png", "**/*.jpg", "**/*.jpeg", "**/*.gif", "**/*.svg", "**/*.ico", "**/*.pt", "**/*.jsonl", "**/*.json", ".gitignore", ".gitmodules", "**/.gitignore", "LICENSE.md", "requirements.txt"]
+path = ["data/**"]
SPDX-FileCopyrightText = "2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)"
SPDX-License-Identifier = "MIT"
diff --git a/__init__.py b/__init__.py
index 7f7c8a3..266b136 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,7 +1,5 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
\ No newline at end of file
diff --git a/assets/ASL_Logo2.svg.license b/assets/ASL_Logo2.svg.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/assets/ASL_Logo2.svg.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/assets/ASLwhite.svg.license b/assets/ASLwhite.svg.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/assets/ASLwhite.svg.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/assets/CDHI_white.svg.license b/assets/CDHI_white.svg.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/assets/CDHI_white.svg.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/assets/cdhi_logo.png.license b/assets/cdhi_logo.png.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/assets/cdhi_logo.png.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/assets/ecg_rationale.png.license b/assets/ecg_rationale.png.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/assets/ecg_rationale.png.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/assets/eth_cdhi_logo.png.license b/assets/eth_cdhi_logo.png.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/assets/eth_cdhi_logo.png.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/assets/eth_logo.png.license b/assets/eth_logo.png.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/assets/eth_logo.png.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/assets/har_rationale.png.license b/assets/har_rationale.png.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/assets/har_rationale.png.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/assets/m4_caption.png.license b/assets/m4_caption.png.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/assets/m4_caption.png.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/assets/schematic_overview_2.png.license b/assets/schematic_overview_2.png.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/assets/schematic_overview_2.png.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/assets/schematic_overview_3.png.license b/assets/schematic_overview_3.png.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/assets/schematic_overview_3.png.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/assets/sleep_rationale.png.license b/assets/sleep_rationale.png.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/assets/sleep_rationale.png.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/assets/stanford_biodesign_logo.png.license b/assets/stanford_biodesign_logo.png.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/assets/stanford_biodesign_logo.png.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/create_doctor_eval_dataset.py b/create_doctor_eval_dataset.py
index 7c7216c..59473fa 100644
--- a/create_doctor_eval_dataset.py
+++ b/create_doctor_eval_dataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Script to create doctor evaluation dataset with correct model predictions.
This script extracts ECG-QA templates with correct model outputs from llama3b_flamingo_predictions.jsonl
diff --git a/curriculum_learning.py b/curriculum_learning.py
index 1269414..a0d3b05 100644
--- a/curriculum_learning.py
+++ b/curriculum_learning.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import sys
import os
diff --git a/data/.gitignore b/data/.gitignore
index 8695fa1..2f75232 100644
--- a/data/.gitignore
+++ b/data/.gitignore
@@ -1,3 +1,9 @@
+# This source file is part of the OpenTSLM open-source project
+#
+# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+#
+# SPDX-License-Identifier: MIT
+
*.csv
*.json
*.jsonl
diff --git a/demo/huggingface/.gitignore b/demo/huggingface/.gitignore
index 6320cd2..935582c 100644
--- a/demo/huggingface/.gitignore
+++ b/demo/huggingface/.gitignore
@@ -1 +1,7 @@
+# This source file is part of the OpenTSLM open-source project
+#
+# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+#
+# SPDX-License-Identifier: MIT
+
data
\ No newline at end of file
diff --git a/demo/huggingface/01_test_hf_tsqa.py b/demo/huggingface/01_test_hf_tsqa.py
index 23fcfeb..eab54d1 100755
--- a/demo/huggingface/01_test_hf_tsqa.py
+++ b/demo/huggingface/01_test_hf_tsqa.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Demo script for testing TSQA (Time Series Question Answering) model from HuggingFace.
diff --git a/demo/huggingface/02_test_hf_m4.py b/demo/huggingface/02_test_hf_m4.py
index bf9a3f8..ab01030 100755
--- a/demo/huggingface/02_test_hf_m4.py
+++ b/demo/huggingface/02_test_hf_m4.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Demo script for testing M4 (Time Series Captioning) model from HuggingFace.
diff --git a/demo/huggingface/03_test_hf_har_cot.py b/demo/huggingface/03_test_hf_har_cot.py
index d6d1ace..762c0d5 100755
--- a/demo/huggingface/03_test_hf_har_cot.py
+++ b/demo/huggingface/03_test_hf_har_cot.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Demo script for testing HAR CoT (Human Activity Recognition Chain-of-Thought) model from HuggingFace.
diff --git a/demo/huggingface/04_test_hf_sleep_cot.py b/demo/huggingface/04_test_hf_sleep_cot.py
index 2c5fa18..1e7498a 100755
--- a/demo/huggingface/04_test_hf_sleep_cot.py
+++ b/demo/huggingface/04_test_hf_sleep_cot.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Demo script for testing Sleep CoT (Sleep Stage Classification Chain-of-Thought) model from HuggingFace.
diff --git a/demo/huggingface/05_test_hf_ecg_qa_cot.py b/demo/huggingface/05_test_hf_ecg_qa_cot.py
index 153f6a9..c399b81 100755
--- a/demo/huggingface/05_test_hf_ecg_qa_cot.py
+++ b/demo/huggingface/05_test_hf_ecg_qa_cot.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Demo script for testing ECG QA CoT (ECG Question Answering Chain-of-Thought) model from HuggingFace.
diff --git a/evaluation/.gitignore b/evaluation/.gitignore
index 39646a4..b33036a 100644
--- a/evaluation/.gitignore
+++ b/evaluation/.gitignore
@@ -1 +1,7 @@
+# This source file is part of the OpenTSLM open-source project
+#
+# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+#
+# SPDX-License-Identifier: MIT
+
*.jsonl
\ No newline at end of file
diff --git a/evaluation/baseline/common_evaluator.py b/evaluation/baseline/common_evaluator.py
index 9edbec4..56287d1 100644
--- a/evaluation/baseline/common_evaluator.py
+++ b/evaluation/baseline/common_evaluator.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import json
import os
diff --git a/evaluation/baseline/common_evaluator_plot.py b/evaluation/baseline/common_evaluator_plot.py
index 886267c..fbe0c8f 100644
--- a/evaluation/baseline/common_evaluator_plot.py
+++ b/evaluation/baseline/common_evaluator_plot.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import os
import io
diff --git a/evaluation/baseline/eval.sh b/evaluation/baseline/eval.sh
index 5bd1c2a..eee8a90 100755
--- a/evaluation/baseline/eval.sh
+++ b/evaluation/baseline/eval.sh
@@ -1,11 +1,10 @@
#!/usr/bin/env bash
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
set -euo pipefail
diff --git a/evaluation/baseline/eval_remaining.sh b/evaluation/baseline/eval_remaining.sh
index a143b4d..c8d6e2e 100644
--- a/evaluation/baseline/eval_remaining.sh
+++ b/evaluation/baseline/eval_remaining.sh
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
+
+# This source file is part of the OpenTSLM open-source project
+#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+#
# SPDX-License-Identifier: MIT
python evaluate_tsqa.py "google/gemma-3-270m"
diff --git a/evaluation/baseline/evaluate_all.py b/evaluation/baseline/evaluate_all.py
index 74a8fb2..6776ac4 100644
--- a/evaluation/baseline/evaluate_all.py
+++ b/evaluation/baseline/evaluate_all.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from typing import Dict, Any, Callable
from common_evaluator import CommonEvaluator
diff --git a/evaluation/baseline/evaluate_ecg_qa.py b/evaluation/baseline/evaluate_ecg_qa.py
index 5c657d9..9b4c3c5 100644
--- a/evaluation/baseline/evaluate_ecg_qa.py
+++ b/evaluation/baseline/evaluate_ecg_qa.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import re
import sys
diff --git a/evaluation/baseline/evaluate_ecg_qa_plot.py b/evaluation/baseline/evaluate_ecg_qa_plot.py
index 3975e01..305669e 100644
--- a/evaluation/baseline/evaluate_ecg_qa_plot.py
+++ b/evaluation/baseline/evaluate_ecg_qa_plot.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import re
import sys
diff --git a/evaluation/baseline/evaluate_har.py b/evaluation/baseline/evaluate_har.py
index c349a09..84dcf22 100644
--- a/evaluation/baseline/evaluate_har.py
+++ b/evaluation/baseline/evaluate_har.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import re
import sys
diff --git a/evaluation/baseline/evaluate_har_plot.py b/evaluation/baseline/evaluate_har_plot.py
index 05cecd1..73b2b51 100644
--- a/evaluation/baseline/evaluate_har_plot.py
+++ b/evaluation/baseline/evaluate_har_plot.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import re
import sys
diff --git a/evaluation/baseline/evaluate_pamap.py b/evaluation/baseline/evaluate_pamap.py
index 32b8150..d966fa3 100644
--- a/evaluation/baseline/evaluate_pamap.py
+++ b/evaluation/baseline/evaluate_pamap.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import re
import sys
diff --git a/evaluation/baseline/evaluate_sleep_cot.py b/evaluation/baseline/evaluate_sleep_cot.py
index ba078c4..5d4058e 100644
--- a/evaluation/baseline/evaluate_sleep_cot.py
+++ b/evaluation/baseline/evaluate_sleep_cot.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import re
import sys
diff --git a/evaluation/baseline/evaluate_sleep_plot.py b/evaluation/baseline/evaluate_sleep_plot.py
index ca71f0c..10029ba 100644
--- a/evaluation/baseline/evaluate_sleep_plot.py
+++ b/evaluation/baseline/evaluate_sleep_plot.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import re
import sys
diff --git a/evaluation/baseline/evaluate_tsqa.py b/evaluation/baseline/evaluate_tsqa.py
index e08738f..96118bc 100644
--- a/evaluation/baseline/evaluate_tsqa.py
+++ b/evaluation/baseline/evaluate_tsqa.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import re
import sys
diff --git a/evaluation/baseline/evaluate_tsqa_plot.py b/evaluation/baseline/evaluate_tsqa_plot.py
index 3e8d03c..07ff325 100644
--- a/evaluation/baseline/evaluate_tsqa_plot.py
+++ b/evaluation/baseline/evaluate_tsqa_plot.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import re
import sys
diff --git a/evaluation/baseline/gruver_llmtime_tokenizer.py b/evaluation/baseline/gruver_llmtime_tokenizer.py
index df2a14d..ad08cac 100644
--- a/evaluation/baseline/gruver_llmtime_tokenizer.py
+++ b/evaluation/baseline/gruver_llmtime_tokenizer.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import sys
import numpy as np
diff --git a/evaluation/baseline/openai_pipeline.py b/evaluation/baseline/openai_pipeline.py
index 41fb555..e69588b 100644
--- a/evaluation/baseline/openai_pipeline.py
+++ b/evaluation/baseline/openai_pipeline.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import os
from openai import OpenAI
diff --git a/evaluation/baseline/parse_predictions_baseline.py b/evaluation/baseline/parse_predictions_baseline.py
index 65e2711..a77e892 100644
--- a/evaluation/baseline/parse_predictions_baseline.py
+++ b/evaluation/baseline/parse_predictions_baseline.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Parse baseline evaluation results and compute macro-F1 from detailed per-sample outputs.
diff --git a/evaluation/baseline/parse_predictions_sleep_baseline.py b/evaluation/baseline/parse_predictions_sleep_baseline.py
index 6352c8f..4e09091 100644
--- a/evaluation/baseline/parse_predictions_sleep_baseline.py
+++ b/evaluation/baseline/parse_predictions_sleep_baseline.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Parse sleep baseline evaluation results from a structured JSON file and compute
diff --git a/evaluation/baseline/parse_predictions_tsqa_baseline.py b/evaluation/baseline/parse_predictions_tsqa_baseline.py
index 579527b..5db56c7 100644
--- a/evaluation/baseline/parse_predictions_tsqa_baseline.py
+++ b/evaluation/baseline/parse_predictions_tsqa_baseline.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Parse sleep baseline evaluation results from a structured JSON file and compute
diff --git a/evaluation/clinician_eval/create_doctor_eval_dataset.py b/evaluation/clinician_eval/create_doctor_eval_dataset.py
index 8ebb3d9..7cc2fa5 100644
--- a/evaluation/clinician_eval/create_doctor_eval_dataset.py
+++ b/evaluation/clinician_eval/create_doctor_eval_dataset.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Script to create doctor evaluation dataset with correct model predictions.
diff --git a/evaluation/clinicianecg/.gitignore b/evaluation/clinicianecg/.gitignore
index 4cd88ea..572e1fe 100644
--- a/evaluation/clinicianecg/.gitignore
+++ b/evaluation/clinicianecg/.gitignore
@@ -1,3 +1,9 @@
+# This source file is part of the OpenTSLM open-source project
+#
+# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+#
+# SPDX-License-Identifier: MIT
+
.temp
.venv
venv
diff --git a/evaluation/clinicianecg/pipeline/1_dataset_analyzer.py b/evaluation/clinicianecg/pipeline/1_dataset_analyzer.py
index 5bf7f16..317d6dc 100644
--- a/evaluation/clinicianecg/pipeline/1_dataset_analyzer.py
+++ b/evaluation/clinicianecg/pipeline/1_dataset_analyzer.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
ECG Dataset Analyzer and Review Assignment Generator
diff --git a/evaluation/clinicianecg/pipeline/2.5_demo_responses.py b/evaluation/clinicianecg/pipeline/2.5_demo_responses.py
index 6cd328c..d174fa0 100644
--- a/evaluation/clinicianecg/pipeline/2.5_demo_responses.py
+++ b/evaluation/clinicianecg/pipeline/2.5_demo_responses.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Demo Response Generator for ECG Review System
diff --git a/evaluation/clinicianecg/pipeline/2_excel_generator.py b/evaluation/clinicianecg/pipeline/2_excel_generator.py
index 843f9f9..1dee6d3 100644
--- a/evaluation/clinicianecg/pipeline/2_excel_generator.py
+++ b/evaluation/clinicianecg/pipeline/2_excel_generator.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
ECG Review Workbook Generator - Final Version
diff --git a/evaluation/clinicianecg/pipeline/3_response_analyzer.py b/evaluation/clinicianecg/pipeline/3_response_analyzer.py
index 18b52d6..024c80f 100644
--- a/evaluation/clinicianecg/pipeline/3_response_analyzer.py
+++ b/evaluation/clinicianecg/pipeline/3_response_analyzer.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
ECG Review Response Analyzer
diff --git a/evaluation/clinicianecg/pipeline/config.json.license b/evaluation/clinicianecg/pipeline/config.json.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/evaluation/clinicianecg/pipeline/config.json.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/evaluation/memory/get_memory_use.py b/evaluation/memory/get_memory_use.py
index cb722a3..c7cf943 100644
--- a/evaluation/memory/get_memory_use.py
+++ b/evaluation/memory/get_memory_use.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import argparse
import csv
diff --git a/evaluation/memory/plot_memory_scaling.py b/evaluation/memory/plot_memory_scaling.py
index 4b4c1fd..93361a5 100644
--- a/evaluation/memory/plot_memory_scaling.py
+++ b/evaluation/memory/plot_memory_scaling.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Paper-style plots: memory usage scaling with N for different lengths (L).
diff --git a/evaluation/memory/plot_memory_simulation.py b/evaluation/memory/plot_memory_simulation.py
index c71fc8f..c431da0 100644
--- a/evaluation/memory/plot_memory_simulation.py
+++ b/evaluation/memory/plot_memory_simulation.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Plot memory usage on simulation datasets from memory_simulation.csv.
diff --git a/evaluation/memory/plot_memory_simulation_per_length.py b/evaluation/memory/plot_memory_simulation_per_length.py
index 045363e..cf3677a 100644
--- a/evaluation/memory/plot_memory_simulation_per_length.py
+++ b/evaluation/memory/plot_memory_simulation_per_length.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Paper-style plots: memory usage scaling with N for different lengths (L).
diff --git a/evaluation/memory/plot_memory_usage.py b/evaluation/memory/plot_memory_usage.py
index c45d341..d676a68 100644
--- a/evaluation/memory/plot_memory_usage.py
+++ b/evaluation/memory/plot_memory_usage.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Alternative visualization for memory usage.
diff --git a/evaluation/memory/run_all_memory.sh b/evaluation/memory/run_all_memory.sh
index bfa75d2..e743d1e 100644
--- a/evaluation/memory/run_all_memory.sh
+++ b/evaluation/memory/run_all_memory.sh
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
+
+# This source file is part of the OpenTSLM open-source project
+#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+#
# SPDX-License-Identifier: MIT
set -euo pipefail
diff --git a/evaluation/opentslm/baseline_parse_predictions.py b/evaluation/opentslm/baseline_parse_predictions.py
index 140004d..4b90f92 100644
--- a/evaluation/opentslm/baseline_parse_predictions.py
+++ b/evaluation/opentslm/baseline_parse_predictions.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""Parser for converting baseline JSON files to clean format."""
diff --git a/evaluation/opentslm/ecg_qa_cot/parse_ecg_qa_cot_data.py b/evaluation/opentslm/ecg_qa_cot/parse_ecg_qa_cot_data.py
index c72223d..bff237c 100644
--- a/evaluation/opentslm/ecg_qa_cot/parse_ecg_qa_cot_data.py
+++ b/evaluation/opentslm/ecg_qa_cot/parse_ecg_qa_cot_data.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""Parser for converting ECG-QA CoT JSONL files to clean format with per-template metrics."""
diff --git a/evaluation/opentslm/get_pamap_cot_predictions.py b/evaluation/opentslm/get_pamap_cot_predictions.py
index cdc1c4d..8db1ad4 100644
--- a/evaluation/opentslm/get_pamap_cot_predictions.py
+++ b/evaluation/opentslm/get_pamap_cot_predictions.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Script to evaluate PAMAP2CoTQADataset with a trained OpenTSLMFlamingo model.
diff --git a/evaluation/opentslm/parse_predictions.py b/evaluation/opentslm/parse_predictions.py
index 8f1c67a..fa0314e 100644
--- a/evaluation/opentslm/parse_predictions.py
+++ b/evaluation/opentslm/parse_predictions.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""Parser for converting RTF-formatted JSONL files to clean format."""
diff --git a/evaluation/opentslm/sleep/baseline_parse_sleep_cot_data.py b/evaluation/opentslm/sleep/baseline_parse_sleep_cot_data.py
index 816a9e0..118a487 100644
--- a/evaluation/opentslm/sleep/baseline_parse_sleep_cot_data.py
+++ b/evaluation/opentslm/sleep/baseline_parse_sleep_cot_data.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""Parser for converting baseline sleep COT JSON files to clean format."""
diff --git a/evaluation/opentslm/sleep/get_sleep_predictions.py b/evaluation/opentslm/sleep/get_sleep_predictions.py
index ff826ec..d7a524d 100644
--- a/evaluation/opentslm/sleep/get_sleep_predictions.py
+++ b/evaluation/opentslm/sleep/get_sleep_predictions.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Script to evaluate SleepEDFCoTQADataset with a trained OpenTSLMSP model.
diff --git a/evaluation/opentslm/sleep/parse_sleep_cot_data.py b/evaluation/opentslm/sleep/parse_sleep_cot_data.py
index 1fb2086..4b4d6e4 100644
--- a/evaluation/opentslm/sleep/parse_sleep_cot_data.py
+++ b/evaluation/opentslm/sleep/parse_sleep_cot_data.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""Parser for converting sleep COT JSONL files to clean format."""
diff --git a/evaluation/opentslm/sleep/plot_sleep_predictions.py b/evaluation/opentslm/sleep/plot_sleep_predictions.py
index c613859..d0da465 100644
--- a/evaluation/opentslm/sleep/plot_sleep_predictions.py
+++ b/evaluation/opentslm/sleep/plot_sleep_predictions.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Plot SleepEDF time series samples from sleep_cot_data.csv.
diff --git a/evaluation/opentslm/tsqa/baseline_parse_predictions.py b/evaluation/opentslm/tsqa/baseline_parse_predictions.py
index 8f907b4..3c5101e 100644
--- a/evaluation/opentslm/tsqa/baseline_parse_predictions.py
+++ b/evaluation/opentslm/tsqa/baseline_parse_predictions.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import json
import os
diff --git a/evaluation/opentslm/tsqa/parse_predictions.py b/evaluation/opentslm/tsqa/parse_predictions.py
index ff024ec..cf2d9ec 100644
--- a/evaluation/opentslm/tsqa/parse_predictions.py
+++ b/evaluation/opentslm/tsqa/parse_predictions.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import json
import os
diff --git a/get_memory_use.py b/get_memory_use.py
index f39f4e1..852423e 100644
--- a/get_memory_use.py
+++ b/get_memory_use.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import argparse
import csv
diff --git a/hf_test.py b/hf_test.py
index dba29e5..318d201 100644
--- a/hf_test.py
+++ b/hf_test.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from src import OpenTSLM, TextPrompt, TextTimeSeriesPrompt, FullPrompt
# Load model
diff --git a/plot_memory_simulation.py b/plot_memory_simulation.py
index 250a537..d033b66 100644
--- a/plot_memory_simulation.py
+++ b/plot_memory_simulation.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Plot memory usage on simulation datasets from memory_simulation.csv.
diff --git a/plot_memory_simulation_per_length.py b/plot_memory_simulation_per_length.py
index 3431a14..409028d 100644
--- a/plot_memory_simulation_per_length.py
+++ b/plot_memory_simulation_per_length.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Paper-style plots: memory usage scaling with N for different lengths (L).
diff --git a/plot_memory_usage.py b/plot_memory_usage.py
index 185c7e6..344cfb3 100644
--- a/plot_memory_usage.py
+++ b/plot_memory_usage.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Alternative visualization for memory usage.
diff --git a/requirements.txt b/requirements.txt
index 52540d0..857847a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,9 @@
+# This source file is part of the OpenTSLM open-source project
+#
+# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+#
+# SPDX-License-Identifier: MIT
+
numpy
pandas
torch
diff --git a/run_all_memory.sh b/run_all_memory.sh
index cf86bb3..e743d1e 100644
--- a/run_all_memory.sh
+++ b/run_all_memory.sh
@@ -1,11 +1,10 @@
#!/usr/bin/env bash
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
set -euo pipefail
diff --git a/run_all_memory_missing.sh b/run_all_memory_missing.sh
index f109ea5..a6c50ff 100644
--- a/run_all_memory_missing.sh
+++ b/run_all_memory_missing.sh
@@ -1,11 +1,10 @@
#!/usr/bin/env bash
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
set -euo pipefail
diff --git a/src/data.py b/src/data.py
index f6e2195..2045994 100644
--- a/src/data.py
+++ b/src/data.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import ast
from typing import Literal, Optional
diff --git a/src/logger.py b/src/logger.py
index 6fde4ad..669165f 100644
--- a/src/logger.py
+++ b/src/logger.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
OpenTSLM Global Logger
diff --git a/src/model/__init__.py b/src/model/__init__.py
index 7566f7d..266b136 100644
--- a/src/model/__init__.py
+++ b/src/model/__init__.py
@@ -1,7 +1,5 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
diff --git a/src/model/encoder/CNNTokenizer.py b/src/model/encoder/CNNTokenizer.py
index bee3780..c622c0a 100644
--- a/src/model/encoder/CNNTokenizer.py
+++ b/src/model/encoder/CNNTokenizer.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import torch
import torch.nn as nn
diff --git a/src/model/encoder/TimeSeriesEncoderBase.py b/src/model/encoder/TimeSeriesEncoderBase.py
index fde57d6..e49a4c7 100644
--- a/src/model/encoder/TimeSeriesEncoderBase.py
+++ b/src/model/encoder/TimeSeriesEncoderBase.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from abc import abstractmethod
import torch
diff --git a/src/model/encoder/TransformerCNNEncoder.py b/src/model/encoder/TransformerCNNEncoder.py
index 5c96844..f22306c 100644
--- a/src/model/encoder/TransformerCNNEncoder.py
+++ b/src/model/encoder/TransformerCNNEncoder.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import torch
import torch.nn as nn
diff --git a/src/model/encoder/TransformerMLPEncoder.py b/src/model/encoder/TransformerMLPEncoder.py
index 6aa59e5..bccc57f 100644
--- a/src/model/encoder/TransformerMLPEncoder.py
+++ b/src/model/encoder/TransformerMLPEncoder.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import torch
import torch.nn as nn
diff --git a/src/model/encoder/__init__.py b/src/model/encoder/__init__.py
index 7566f7d..266b136 100644
--- a/src/model/encoder/__init__.py
+++ b/src/model/encoder/__init__.py
@@ -1,7 +1,5 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
diff --git a/src/model/llm/OpenTSLM.py b/src/model/llm/OpenTSLM.py
index d705e9b..1980625 100644
--- a/src/model/llm/OpenTSLM.py
+++ b/src/model/llm/OpenTSLM.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import torch
from typing import Optional, Union
from enum import Enum
diff --git a/src/model/llm/OpenTSLMFlamingo.py b/src/model/llm/OpenTSLMFlamingo.py
index 58517c7..39e5101 100644
--- a/src/model/llm/OpenTSLMFlamingo.py
+++ b/src/model/llm/OpenTSLMFlamingo.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from types import SimpleNamespace
from model.encoder.CNNTokenizer import CNNTokenizer
diff --git a/src/model/llm/OpenTSLMSP.py b/src/model/llm/OpenTSLMSP.py
index d594433..59c290e 100644
--- a/src/model/llm/OpenTSLMSP.py
+++ b/src/model/llm/OpenTSLMSP.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import torch
import torch.nn as nn
diff --git a/src/model/llm/TimeSeriesFlamingoWithTrainableEncoder.py b/src/model/llm/TimeSeriesFlamingoWithTrainableEncoder.py
index 9bebf84..5ca67eb 100644
--- a/src/model/llm/TimeSeriesFlamingoWithTrainableEncoder.py
+++ b/src/model/llm/TimeSeriesFlamingoWithTrainableEncoder.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import torch
from torch import nn
diff --git a/src/model/llm/TimeSeriesLLM.py b/src/model/llm/TimeSeriesLLM.py
index 987f52f..55af6d2 100644
--- a/src/model/llm/TimeSeriesLLM.py
+++ b/src/model/llm/TimeSeriesLLM.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import torch
import torch.nn as nn
diff --git a/src/model/llm/__init__.py b/src/model/llm/__init__.py
index 7566f7d..266b136 100644
--- a/src/model/llm/__init__.py
+++ b/src/model/llm/__init__.py
@@ -1,7 +1,5 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
diff --git a/src/model/projector/LinearProjector.py b/src/model/projector/LinearProjector.py
index 83e43a3..0e9c9e2 100644
--- a/src/model/projector/LinearProjector.py
+++ b/src/model/projector/LinearProjector.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import torch.nn as nn
diff --git a/src/model/projector/MLPProjector.py b/src/model/projector/MLPProjector.py
index 2c47f41..af07ca9 100644
--- a/src/model/projector/MLPProjector.py
+++ b/src/model/projector/MLPProjector.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import torch.nn as nn
diff --git a/src/model/projector/__init__.py b/src/model/projector/__init__.py
index 7566f7d..266b136 100644
--- a/src/model/projector/__init__.py
+++ b/src/model/projector/__init__.py
@@ -1,7 +1,5 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
diff --git a/src/model_config.py b/src/model_config.py
index 698b7f6..0412f6b 100644
--- a/src/model_config.py
+++ b/src/model_config.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
# ---------------------------
# Hyper‑parameters
diff --git a/src/prompt/__init__.py b/src/prompt/__init__.py
index a0e9941..6882dbc 100644
--- a/src/prompt/__init__.py
+++ b/src/prompt/__init__.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
# from .prompt import Prompt
# from .full_prompt import FullPrompt
diff --git a/src/prompt/full_prompt.py b/src/prompt/full_prompt.py
index 6d18239..501d61f 100644
--- a/src/prompt/full_prompt.py
+++ b/src/prompt/full_prompt.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from typing import List
from prompt.text_prompt import TextPrompt
diff --git a/src/prompt/prompt.py b/src/prompt/prompt.py
index 59f237a..69b4fdd 100644
--- a/src/prompt/prompt.py
+++ b/src/prompt/prompt.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from abc import ABC, abstractmethod
diff --git a/src/prompt/prompt_with_answer.py b/src/prompt/prompt_with_answer.py
index 21e2477..9df2d02 100644
--- a/src/prompt/prompt_with_answer.py
+++ b/src/prompt/prompt_with_answer.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from typing import List
from prompt.text_prompt import TextPrompt
diff --git a/src/prompt/text_prompt.py b/src/prompt/text_prompt.py
index ebeff15..11c1945 100644
--- a/src/prompt/text_prompt.py
+++ b/src/prompt/text_prompt.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from .prompt import Prompt
diff --git a/src/prompt/text_time_series_prompt.py b/src/prompt/text_time_series_prompt.py
index 8c8ab3a..d38da3c 100644
--- a/src/prompt/text_time_series_prompt.py
+++ b/src/prompt/text_time_series_prompt.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from .prompt import Prompt
import numpy as np
diff --git a/src/time_series_datasets/QADataset.py b/src/time_series_datasets/QADataset.py
index e8b492f..8375b9c 100644
--- a/src/time_series_datasets/QADataset.py
+++ b/src/time_series_datasets/QADataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from abc import ABC, abstractmethod
from functools import partial
diff --git a/src/time_series_datasets/TSQADataset.py b/src/time_series_datasets/TSQADataset.py
index dd826a0..9f1a4f3 100644
--- a/src/time_series_datasets/TSQADataset.py
+++ b/src/time_series_datasets/TSQADataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import json
from typing import List, Tuple
diff --git a/src/time_series_datasets/__init__.py b/src/time_series_datasets/__init__.py
index 7f7c8a3..266b136 100644
--- a/src/time_series_datasets/__init__.py
+++ b/src/time_series_datasets/__init__.py
@@ -1,7 +1,5 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
\ No newline at end of file
diff --git a/src/time_series_datasets/constants.py b/src/time_series_datasets/constants.py
index 3f5e8c3..9725661 100644
--- a/src/time_series_datasets/constants.py
+++ b/src/time_series_datasets/constants.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
# constants.py
diff --git a/src/time_series_datasets/ecg_qa/ECGQACoTQADataset.py b/src/time_series_datasets/ecg_qa/ECGQACoTQADataset.py
index 03ad80b..1f15da9 100644
--- a/src/time_series_datasets/ecg_qa/ECGQACoTQADataset.py
+++ b/src/time_series_datasets/ecg_qa/ECGQACoTQADataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from datasets import Dataset
from typing import List, Tuple, Literal
diff --git a/src/time_series_datasets/ecg_qa/ECGQADataset.py b/src/time_series_datasets/ecg_qa/ECGQADataset.py
index dacaffa..fc3c17b 100644
--- a/src/time_series_datasets/ecg_qa/ECGQADataset.py
+++ b/src/time_series_datasets/ecg_qa/ECGQADataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from datasets import Dataset
from typing import List, Tuple, Literal
diff --git a/src/time_series_datasets/ecg_qa/__init__.py b/src/time_series_datasets/ecg_qa/__init__.py
index 5c02d22..4ba0c41 100644
--- a/src/time_series_datasets/ecg_qa/__init__.py
+++ b/src/time_series_datasets/ecg_qa/__init__.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
ECG-QA Dataset Module
diff --git a/src/time_series_datasets/ecg_qa/dataset_distribution.png.license b/src/time_series_datasets/ecg_qa/dataset_distribution.png.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/src/time_series_datasets/ecg_qa/dataset_distribution.png.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/src/time_series_datasets/ecg_qa/ecg_example_real.png.license b/src/time_series_datasets/ecg_qa/ecg_example_real.png.license
new file mode 100644
index 0000000..e83264a
--- /dev/null
+++ b/src/time_series_datasets/ecg_qa/ecg_example_real.png.license
@@ -0,0 +1,5 @@
+This source file is part of the OpenTSLM open-source project
+
+SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+
+SPDX-License-Identifier: MIT
diff --git a/src/time_series_datasets/ecg_qa/ecgqa_cot_loader.py b/src/time_series_datasets/ecg_qa/ecgqa_cot_loader.py
index 868c125..b419d42 100644
--- a/src/time_series_datasets/ecg_qa/ecgqa_cot_loader.py
+++ b/src/time_series_datasets/ecg_qa/ecgqa_cot_loader.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import os
import subprocess
diff --git a/src/time_series_datasets/ecg_qa/ecgqa_loader.py b/src/time_series_datasets/ecg_qa/ecgqa_loader.py
index 2b82dc7..5f112c9 100644
--- a/src/time_series_datasets/ecg_qa/ecgqa_loader.py
+++ b/src/time_series_datasets/ecg_qa/ecgqa_loader.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import os
diff --git a/src/time_series_datasets/ecg_qa/plot_example.py b/src/time_series_datasets/ecg_qa/plot_example.py
index 0dc4238..d04cfdc 100644
--- a/src/time_series_datasets/ecg_qa/plot_example.py
+++ b/src/time_series_datasets/ecg_qa/plot_example.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
ECG-QA Example Plot Generator
diff --git a/src/time_series_datasets/har_cot/HARAccQADataset.py b/src/time_series_datasets/har_cot/HARAccQADataset.py
index 8250b03..7d0a71e 100644
--- a/src/time_series_datasets/har_cot/HARAccQADataset.py
+++ b/src/time_series_datasets/har_cot/HARAccQADataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from datasets import Dataset
from typing import List, Tuple, Literal
diff --git a/src/time_series_datasets/har_cot/HARCoTQADataset.py b/src/time_series_datasets/har_cot/HARCoTQADataset.py
index b23c6a4..914018c 100644
--- a/src/time_series_datasets/har_cot/HARCoTQADataset.py
+++ b/src/time_series_datasets/har_cot/HARCoTQADataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from datasets import Dataset
from typing import List, Tuple, Literal
diff --git a/src/time_series_datasets/har_cot/__init__.py b/src/time_series_datasets/har_cot/__init__.py
index 78a4fb7..266b136 100644
--- a/src/time_series_datasets/har_cot/__init__.py
+++ b/src/time_series_datasets/har_cot/__init__.py
@@ -1,9 +1,5 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
-
-
\ No newline at end of file
diff --git a/src/time_series_datasets/har_cot/har_cot_loader.py b/src/time_series_datasets/har_cot/har_cot_loader.py
index 89c9ff8..4b0721e 100644
--- a/src/time_series_datasets/har_cot/har_cot_loader.py
+++ b/src/time_series_datasets/har_cot/har_cot_loader.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import os
import pandas as pd
diff --git a/src/time_series_datasets/m4/M4QADataset.py b/src/time_series_datasets/m4/M4QADataset.py
index 518678c..1613c65 100644
--- a/src/time_series_datasets/m4/M4QADataset.py
+++ b/src/time_series_datasets/m4/M4QADataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
M4QADataset.py
diff --git a/src/time_series_datasets/m4/__init__.py b/src/time_series_datasets/m4/__init__.py
index 4287c51..5fadb4e 100644
--- a/src/time_series_datasets/m4/__init__.py
+++ b/src/time_series_datasets/m4/__init__.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from .m4_loader import load_m4_data, load_all_m4_data, create_combined_dataset
from .M4QADataset import M4QADataset
diff --git a/src/time_series_datasets/m4/m4_loader.py b/src/time_series_datasets/m4/m4_loader.py
index 34c8974..df14427 100644
--- a/src/time_series_datasets/m4/m4_loader.py
+++ b/src/time_series_datasets/m4/m4_loader.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
m4_loader.py
diff --git a/src/time_series_datasets/monash/MonashDataset.py b/src/time_series_datasets/monash/MonashDataset.py
index 30419aa..7d10e37 100644
--- a/src/time_series_datasets/monash/MonashDataset.py
+++ b/src/time_series_datasets/monash/MonashDataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import logging
import os
diff --git a/src/time_series_datasets/monash/MonashSPO2QADataset.py b/src/time_series_datasets/monash/MonashSPO2QADataset.py
index 87f2ead..2f22427 100644
--- a/src/time_series_datasets/monash/MonashSPO2QADataset.py
+++ b/src/time_series_datasets/monash/MonashSPO2QADataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from typing import List, Literal, Optional, Tuple
from datasets import Dataset
diff --git a/src/time_series_datasets/monash/__init__.py b/src/time_series_datasets/monash/__init__.py
index c3b6620..266b136 100644
--- a/src/time_series_datasets/monash/__init__.py
+++ b/src/time_series_datasets/monash/__init__.py
@@ -1,8 +1,5 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
-
diff --git a/src/time_series_datasets/monash/monash_utils.py b/src/time_series_datasets/monash/monash_utils.py
index a5b2de5..f3d98e4 100644
--- a/src/time_series_datasets/monash/monash_utils.py
+++ b/src/time_series_datasets/monash/monash_utils.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import numpy as np
import pandas as pd
diff --git a/src/time_series_datasets/pamap2/BalancedBatchSampler.py b/src/time_series_datasets/pamap2/BalancedBatchSampler.py
index cd57d6f..47a795e 100644
--- a/src/time_series_datasets/pamap2/BalancedBatchSampler.py
+++ b/src/time_series_datasets/pamap2/BalancedBatchSampler.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import numpy as np
from torch.utils.data import Sampler
diff --git a/src/time_series_datasets/pamap2/PAMAP2AccQADataset.py b/src/time_series_datasets/pamap2/PAMAP2AccQADataset.py
index b57bf8e..dea805e 100644
--- a/src/time_series_datasets/pamap2/PAMAP2AccQADataset.py
+++ b/src/time_series_datasets/pamap2/PAMAP2AccQADataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from datasets import Dataset
from typing import List, Tuple
diff --git a/src/time_series_datasets/pamap2/PAMAP2CoTQADataset.py b/src/time_series_datasets/pamap2/PAMAP2CoTQADataset.py
index 4ec30d3..1b6c5a5 100644
--- a/src/time_series_datasets/pamap2/PAMAP2CoTQADataset.py
+++ b/src/time_series_datasets/pamap2/PAMAP2CoTQADataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from datasets import Dataset
from typing import List, Tuple, Literal
diff --git a/src/time_series_datasets/pamap2/PAMAP2Dataset.py b/src/time_series_datasets/pamap2/PAMAP2Dataset.py
index ffe1bbe..bf485a9 100644
--- a/src/time_series_datasets/pamap2/PAMAP2Dataset.py
+++ b/src/time_series_datasets/pamap2/PAMAP2Dataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from typing import Tuple
import pandas as pd
diff --git a/src/time_series_datasets/pamap2/__init__.py b/src/time_series_datasets/pamap2/__init__.py
index c3b6620..266b136 100644
--- a/src/time_series_datasets/pamap2/__init__.py
+++ b/src/time_series_datasets/pamap2/__init__.py
@@ -1,8 +1,5 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
-
diff --git a/src/time_series_datasets/pamap2/pamap2_cot_loader.py b/src/time_series_datasets/pamap2/pamap2_cot_loader.py
index 88a5c23..de38ec0 100644
--- a/src/time_series_datasets/pamap2/pamap2_cot_loader.py
+++ b/src/time_series_datasets/pamap2/pamap2_cot_loader.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import os
import pandas as pd
diff --git a/src/time_series_datasets/pamap2/pamap2_loader.py b/src/time_series_datasets/pamap2/pamap2_loader.py
index 0b3bb65..9f32ba0 100644
--- a/src/time_series_datasets/pamap2/pamap2_loader.py
+++ b/src/time_series_datasets/pamap2/pamap2_loader.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import os
import zipfile
diff --git a/src/time_series_datasets/simulation/SimulationQADataset.py b/src/time_series_datasets/simulation/SimulationQADataset.py
index ceedc22..fb1fdbf 100644
--- a/src/time_series_datasets/simulation/SimulationQADataset.py
+++ b/src/time_series_datasets/simulation/SimulationQADataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import numpy as np
import torch
diff --git a/src/time_series_datasets/sleep/SleepEDFCoTQADataset.py b/src/time_series_datasets/sleep/SleepEDFCoTQADataset.py
index a9b2241..09217b6 100644
--- a/src/time_series_datasets/sleep/SleepEDFCoTQADataset.py
+++ b/src/time_series_datasets/sleep/SleepEDFCoTQADataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from datasets import Dataset
from typing import List, Tuple, Literal
diff --git a/src/time_series_datasets/sleep/SleepEDFQADataset.py b/src/time_series_datasets/sleep/SleepEDFQADataset.py
index 24c7ead..bac0f4e 100644
--- a/src/time_series_datasets/sleep/SleepEDFQADataset.py
+++ b/src/time_series_datasets/sleep/SleepEDFQADataset.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from datasets import Dataset
from typing import List, Tuple, Literal
diff --git a/src/time_series_datasets/sleep/__init__.py b/src/time_series_datasets/sleep/__init__.py
index 78a4fb7..266b136 100644
--- a/src/time_series_datasets/sleep/__init__.py
+++ b/src/time_series_datasets/sleep/__init__.py
@@ -1,9 +1,5 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
-
-
\ No newline at end of file
diff --git a/src/time_series_datasets/sleep/sleepedf_cot_loader.py b/src/time_series_datasets/sleep/sleepedf_cot_loader.py
index 19d7ad3..c6f1db2 100644
--- a/src/time_series_datasets/sleep/sleepedf_cot_loader.py
+++ b/src/time_series_datasets/sleep/sleepedf_cot_loader.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import os
import pandas as pd
diff --git a/src/time_series_datasets/tsqa.py b/src/time_series_datasets/tsqa.py
index 58b2b2a..2657d4d 100644
--- a/src/time_series_datasets/tsqa.py
+++ b/src/time_series_datasets/tsqa.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from typing import Literal, Optional
diff --git a/src/time_series_datasets/ucr/__init__.py b/src/time_series_datasets/ucr/__init__.py
index bdbed1f..29c6eab 100644
--- a/src/time_series_datasets/ucr/__init__.py
+++ b/src/time_series_datasets/ucr/__init__.py
@@ -1,9 +1,7 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
from .ucr_loader import get_ucr_loader, load_ucr_dataset, UCRDataset, collate_fn
\ No newline at end of file
diff --git a/src/time_series_datasets/ucr/ucr_loader.py b/src/time_series_datasets/ucr/ucr_loader.py
index 381fc4b..285f883 100644
--- a/src/time_series_datasets/ucr/ucr_loader.py
+++ b/src/time_series_datasets/ucr/ucr_loader.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import os
import zipfile
diff --git a/src/time_series_datasets/util.py b/src/time_series_datasets/util.py
index 3649245..3afa617 100644
--- a/src/time_series_datasets/util.py
+++ b/src/time_series_datasets/util.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import math
from typing import List
diff --git a/test/.gitignore b/test/.gitignore
index 6320cd2..935582c 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -1 +1,7 @@
+# This source file is part of the OpenTSLM open-source project
+#
+# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
+#
+# SPDX-License-Identifier: MIT
+
data
\ No newline at end of file
diff --git a/test/__init__.py b/test/__init__.py
index 7f7c8a3..266b136 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -1,7 +1,5 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
\ No newline at end of file
diff --git a/test/ecg_qa_cot_test.py b/test/ecg_qa_cot_test.py
index a213551..f9a251d 100644
--- a/test/ecg_qa_cot_test.py
+++ b/test/ecg_qa_cot_test.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Test script for the ECG-QA CoT loader and dataset.
diff --git a/test/ecg_qa_test.py b/test/ecg_qa_test.py
index 105f9cd..2451c4d 100644
--- a/test/ecg_qa_test.py
+++ b/test/ecg_qa_test.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Test script for ECG-QA dataset implementation.
diff --git a/test/elastic_ddp.py b/test/elastic_ddp.py
index fd557c9..41ccbb6 100644
--- a/test/elastic_ddp.py
+++ b/test/elastic_ddp.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import torch
import torch.distributed as dist
diff --git a/test/eval_EmbedHealthFlamingo.py b/test/eval_EmbedHealthFlamingo.py
index dce2c1b..c92e488 100644
--- a/test/eval_EmbedHealthFlamingo.py
+++ b/test/eval_EmbedHealthFlamingo.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import json
from typing import List
diff --git a/test/har_cot_test.py b/test/har_cot_test.py
index 44226ee..08de573 100644
--- a/test/har_cot_test.py
+++ b/test/har_cot_test.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Test script for the HAR CoT loader and dataset.
diff --git a/test/m4_loader_test.py b/test/m4_loader_test.py
index e80d808..1df4423 100644
--- a/test/m4_loader_test.py
+++ b/test/m4_loader_test.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Test script for the M4QADataset with caption generation.
diff --git a/test/pamap_cot_loader_test.py b/test/pamap_cot_loader_test.py
index 99f3cd8..ab4f55b 100644
--- a/test/pamap_cot_loader_test.py
+++ b/test/pamap_cot_loader_test.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Test script for the PAMAP2 CoT loader.
diff --git a/test/sleepedf_cot_loader_test.py b/test/sleepedf_cot_loader_test.py
index bfdbed7..babd393 100644
--- a/test/sleepedf_cot_loader_test.py
+++ b/test/sleepedf_cot_loader_test.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Test script for the SleepEDF CoT loader.
diff --git a/test/test_curriculum_trainer.py b/test/test_curriculum_trainer.py
index da770b4..22cd4d0 100644
--- a/test/test_curriculum_trainer.py
+++ b/test/test_curriculum_trainer.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Test script for the curriculum learning implementation.
diff --git a/test/test_inference.py b/test/test_inference.py
index 5d78afb..c6ff269 100644
--- a/test/test_inference.py
+++ b/test/test_inference.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import torch
import numpy as np
diff --git a/test/test_medgemma_support.py b/test/test_medgemma_support.py
index ba73af1..5abc390 100644
--- a/test/test_medgemma_support.py
+++ b/test/test_medgemma_support.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
-#
+
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
"""
Test script to verify MedGemma support in OpenTSLMFlamingo.
diff --git a/test/test_train_EmbedHealthFlamingo.py b/test/test_train_EmbedHealthFlamingo.py
index 4747463..90cd54f 100644
--- a/test/test_train_EmbedHealthFlamingo.py
+++ b/test/test_train_EmbedHealthFlamingo.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import json
import os
diff --git a/test/test_train_EmbedHealthSP.py b/test/test_train_EmbedHealthSP.py
index e136004..1107739 100644
--- a/test/test_train_EmbedHealthSP.py
+++ b/test/test_train_EmbedHealthSP.py
@@ -1,10 +1,8 @@
-#
# This source file is part of the OpenTSLM open-source project
#
# SPDX-FileCopyrightText: 2025 Stanford University, ETH Zurich, and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
-#
import json
import os