ngxson HF staff commited on
Commit
ae88e37
·
verified ·
1 Parent(s): 337b381

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -30,7 +30,7 @@ def run_command(command):
30
  command,
31
  stdout=subprocess.PIPE,
32
  stderr=subprocess.PIPE,
33
- bufsize=1,
34
  universal_newlines=False
35
  )
36
 
@@ -88,14 +88,16 @@ def process_model(ft_model_id: str, base_model_id: str, rank: str, private_repo,
88
 
89
  with tempfile.TemporaryDirectory(dir="outputs") as outputdir:
90
  device = "cuda" if torch.cuda.is_available() else "cpu"
91
- (returncode, output_stdout, output_stderr) = run_command([
92
  "mergekit-extract-lora",
93
  ft_model_id,
94
  base_model_id,
95
  outputdir,
96
  f"--rank={rank}",
97
  f"--device={device}"
98
- ])
 
 
99
  print("returncode", returncode)
100
  print("output_stdout", output_stdout)
101
  print("output_stderr", output_stderr)
 
30
  command,
31
  stdout=subprocess.PIPE,
32
  stderr=subprocess.PIPE,
33
+ #bufsize=1,
34
  universal_newlines=False
35
  )
36
 
 
88
 
89
  with tempfile.TemporaryDirectory(dir="outputs") as outputdir:
90
  device = "cuda" if torch.cuda.is_available() else "cpu"
91
+ cmd = [
92
  "mergekit-extract-lora",
93
  ft_model_id,
94
  base_model_id,
95
  outputdir,
96
  f"--rank={rank}",
97
  f"--device={device}"
98
+ ]
99
+ print("cmd", cmd)
100
+ (returncode, output_stdout, output_stderr) = run_command()
101
  print("returncode", returncode)
102
  print("output_stdout", output_stdout)
103
  print("output_stderr", output_stderr)