Add catch for misspelled --task (#10420)

* Add catch for misspelled task

Signed-off-by: Leander van Eekelen <47320151+leandervaneekelen@users.noreply.github.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update val.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update val.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Leander van Eekelen <47320151+leandervaneekelen@users.noreply.github.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
authored and GitHub committed 2022-12-06 14:48:17 -08:00
1 parent f8539a6800
commit 0a1fdcd8eb
2 files changed
+4

No files matched your search

+2
View File
@@ -463,6 +463,8 @@ def main(opt):
np.savetxt(f, y, fmt='%10.4g') # save
os.system('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")')
if __name__ == "__main__":
+2
View File
@@ -399,6 +399,8 @@ def main(opt):
np.savetxt(f, y, fmt='%10.4g') # save
os.system('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")')
if __name__ == "__main__":