Subprocess improvements (#10973)
* Use list-form arguments for subprocess.run calls where possible Augments #10944 * Deduplicate curl code * Avoid eval() to parse integer --------- Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
1 parent
1a2eb532ce
commit
a2de5c5bf6
8 files changed
+68
-24
No files matched your search
+1
-1
@@ -462,7 +462,7 @@ def main(opt):
|
||||
r, _, t = run(**vars(opt), plots=False)
|
||||
y.append(r + t) # results and times
|
||||
np.savetxt(f, y, fmt='%10.4g') # save
|
||||
subprocess.run('zip -r study.zip study_*.txt'.split())
|
||||
subprocess.run(['zip', '-r', 'study.zip', 'study_*.txt'])
|
||||
plot_val_study(x=x) # plot
|
||||
else:
|
||||
raise NotImplementedError(f'--task {opt.task} not in ("train", "val", "test", "speed", "study")')
|
||||
|
||||
Reference in new issue
Block a user