File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ()))
Original file line number Diff line number Diff line change 1616from pathlib import Path
1717
1818
19- KEYWORDS = ("Copyright" , "2025" , "LlamaFactory" )
19+ KEYWORDS = ("Copyright" , "LlamaFactory" )
20+ VALID_YEARS = ("2025" , "2026" )
2021
2122
2223def 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
3740if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments