Update launch.py
Browse files
launch.py
CHANGED
@@ -307,10 +307,17 @@ def prepare_environment():
|
|
307 |
print("Exiting because of --exit argument")
|
308 |
exit(0)
|
309 |
|
|
|
|
|
|
|
|
|
310 |
|
311 |
def tests(test_dir):
|
312 |
if "--api" not in sys.argv:
|
313 |
sys.argv.append("--api")
|
|
|
|
|
|
|
314 |
if "--skip-torch-cuda-test" not in sys.argv:
|
315 |
sys.argv.append("--skip-torch-cuda-test")
|
316 |
if "--disable-nan-check" not in sys.argv:
|
|
|
307 |
print("Exiting because of --exit argument")
|
308 |
exit(0)
|
309 |
|
310 |
+
if args.tests and not args.no_tests:
|
311 |
+
exitcode = tests(args.tests)
|
312 |
+
exit(exitcode)
|
313 |
+
|
314 |
|
315 |
def tests(test_dir):
|
316 |
if "--api" not in sys.argv:
|
317 |
sys.argv.append("--api")
|
318 |
+
if "--ckpt" not in sys.argv:
|
319 |
+
sys.argv.append("--ckpt")
|
320 |
+
sys.argv.append(os.path.join(script_path, "test/test_files/empty.pt"))
|
321 |
if "--skip-torch-cuda-test" not in sys.argv:
|
322 |
sys.argv.append("--skip-torch-cuda-test")
|
323 |
if "--disable-nan-check" not in sys.argv:
|