Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
8685680
1
Parent(s):
9b3be67
Clean up testing caller
Browse files- pysr/_cli/main.py +11 -12
pysr/_cli/main.py
CHANGED
@@ -55,17 +55,16 @@ def _tests(tests):
|
|
55 |
Choose from main, jax, torch, cli, and warm-start. You can give multiple tests, separated by commas.
|
56 |
"""
|
57 |
for test in tests.split(","):
|
58 |
-
if test
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
runtests_warm_start()
|
70 |
else:
|
71 |
warnings.warn(f"Invalid test {test}. Skipping.")
|
|
|
55 |
Choose from main, jax, torch, cli, and warm-start. You can give multiple tests, separated by commas.
|
56 |
"""
|
57 |
for test in tests.split(","):
|
58 |
+
if test == "main":
|
59 |
+
runtests()
|
60 |
+
elif test == "jax":
|
61 |
+
runtests_jax()
|
62 |
+
elif test == "torch":
|
63 |
+
runtests_torch()
|
64 |
+
elif test == "cli":
|
65 |
+
runtests_cli = get_runtests_cli()
|
66 |
+
runtests_cli()
|
67 |
+
elif test == "warm-start":
|
68 |
+
runtests_warm_start()
|
|
|
69 |
else:
|
70 |
warnings.warn(f"Invalid test {test}. Skipping.")
|