Skip to content

Commit 1905a0f

Browse files
committed
fix check license to support 2026
1 parent edf537e commit 1905a0f

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/llamafactory/v1/launcher.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ def launch():
6161
if command in _DIST_TRAIN_COMMANDS and (
6262
is_env_enabled("FORCE_TORCHRUN") or (get_device_count() > 1 and not use_ray() and not use_kt())
6363
):
64-
# breakpoint()
65-
# launch distributed training
64+
6665
nnodes = os.getenv("NNODES", "1")
6766
node_rank = os.getenv("NODE_RANK", "0")
6867
nproc_per_node = os.getenv("NPROC_PER_NODE", str(get_device_count()))

tests/check_license.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
from pathlib import Path
1717

1818

19-
KEYWORDS = ("Copyright", "2025", "LlamaFactory")
19+
KEYWORDS = ("Copyright", "LlamaFactory")
20+
VALID_YEARS = ("2025", "2026")
2021

2122

2223
def main():
@@ -31,7 +32,9 @@ def main():
3132
continue
3233

3334
print(f"Check license: {path}")
34-
assert all(keyword in file_content[0] for keyword in KEYWORDS), f"File {path} does not contain license."
35+
first_line = file_content[0]
36+
assert all(keyword in first_line for keyword in KEYWORDS), f"File {path} does not contain license."
37+
assert any(year in first_line for year in VALID_YEARS), f"File {path} does not contain valid year."
3538

3639

3740
if __name__ == "__main__":

0 commit comments

Comments
 (0)