Spaces:
Configuration error
Configuration error
unknown
commited on
Commit
·
66062f9
1
Parent(s):
34ccbcb
replace python with accelerate
Browse files- finetune_gradio.py +2 -3
finetune_gradio.py
CHANGED
@@ -22,8 +22,6 @@ from datasets.arrow_writer import ArrowWriter
|
|
22 |
|
23 |
import json
|
24 |
|
25 |
-
|
26 |
-
|
27 |
training_process = None
|
28 |
system = platform.system()
|
29 |
python_executable = sys.executable or "python"
|
@@ -283,7 +281,7 @@ def start_training(dataset_name="",
|
|
283 |
yield "start train",gr.update(interactive=False),gr.update(interactive=False)
|
284 |
|
285 |
# Command to run the training script with the specified arguments
|
286 |
-
cmd = f"
|
287 |
f"--learning_rate {learning_rate} " \
|
288 |
f"--batch_size_per_gpu {batch_size_per_gpu} " \
|
289 |
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
|
|
505 |
data = json.load(file)
|
506 |
|
507 |
duration_list = data['duration']
|
|
|
508 |
samples = len(duration_list)
|
509 |
|
510 |
if torch.cuda.is_available():
|
|
|
22 |
|
23 |
import json
|
24 |
|
|
|
|
|
25 |
training_process = None
|
26 |
system = platform.system()
|
27 |
python_executable = sys.executable or "python"
|
|
|
281 |
yield "start train",gr.update(interactive=False),gr.update(interactive=False)
|
282 |
|
283 |
# Command to run the training script with the specified arguments
|
284 |
+
cmd = f"accelerate launch finetune-cli.py --exp_name {exp_name} " \
|
285 |
f"--learning_rate {learning_rate} " \
|
286 |
f"--batch_size_per_gpu {batch_size_per_gpu} " \
|
287 |
f"--batch_size_type {batch_size_type} " \
|
|
|
503 |
data = json.load(file)
|
504 |
|
505 |
duration_list = data['duration']
|
506 |
+
|
507 |
samples = len(duration_list)
|
508 |
|
509 |
if torch.cuda.is_available():
|