Skip to content

Commit 66062f9

Browse files
committed
replace python with accelerate
1 parent 34ccbcb commit 66062f9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

finetune_gradio.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323
import json
2424

25-
26-
2725
training_process = None
2826
system = platform.system()
2927
python_executable = sys.executable or "python"
@@ -283,7 +281,7 @@ def start_training(dataset_name="",
283281
yield "start train",gr.update(interactive=False),gr.update(interactive=False)
284282

285283
# Command to run the training script with the specified arguments
286-
cmd = f"{python_executable} finetune-cli.py --exp_name {exp_name} " \
284+
cmd = f"accelerate launch finetune-cli.py --exp_name {exp_name} " \
287285
f"--learning_rate {learning_rate} " \
288286
f"--batch_size_per_gpu {batch_size_per_gpu} " \
289287
f"--batch_size_type {batch_size_type} " \
@@ -505,6 +503,7 @@ def calculate_train(name_project,batch_size_type,max_samples,learning_rate,num_w
505503
data = json.load(file)
506504

507505
duration_list = data['duration']
506+
508507
samples = len(duration_list)
509508

510509
if torch.cuda.is_available():

0 commit comments

Comments
 (0)