MCPcopy Create free account
hub / github.com/ZinYY/TreeLoRA / get_cmd

Function get_cmd

train.py:151–165  ·  view source on GitHub ↗
(args, step_num)

Source from the content-addressed store, hash-verified

149
150
151def get_cmd(args, step_num):
152 output_dir = get_output_dir(args, step_num)
153 script = get_script(args, step_num)
154
155 if step_num in (1, 2):
156 zero_stage = get_zero_stage(args, step_num)
157 cmd = f"bash {script} {output_dir} {zero_stage}"
158 if step_num == 3:
159 verify_model(args, 1) # Verify step 1 model exists
160 verify_model(args, 2) # Verify step 2 model exists
161 s1_dir, s1_zs = get_output_dir(args, 1), get_zero_stage(args, 1)
162 s2_dir, s2_zs = get_output_dir(args, 2), get_zero_stage(args, 2)
163 cmd = f"bash {script} {s1_dir} {s2_dir} '{s1_zs}' '{s2_zs}' {output_dir}"
164
165 return cmd
166
167
168def launch_cmd(args, step_num, cmd):

Callers 1

mainFunction · 0.85

Calls 4

get_output_dirFunction · 0.85
get_scriptFunction · 0.85
get_zero_stageFunction · 0.85
verify_modelFunction · 0.85

Tested by

no test coverage detected