Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
af58f1b3
Commit
af58f1b3
authored
Jun 11, 2022
by
Antoine Kaufmann
Browse files
experiments: add --list arg for run.py
This only lists the experiment names
parent
c7c55cdd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
experiments/run.py
experiments/run.py
+7
-0
No files found.
experiments/run.py
View file @
af58f1b3
...
@@ -42,6 +42,8 @@ def mkdir_if_not_exists(path):
...
@@ -42,6 +42,8 @@ def mkdir_if_not_exists(path):
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'experiments'
,
metavar
=
'EXP'
,
type
=
str
,
nargs
=
'+'
,
parser
.
add_argument
(
'experiments'
,
metavar
=
'EXP'
,
type
=
str
,
nargs
=
'+'
,
help
=
'An experiment file to run'
)
help
=
'An experiment file to run'
)
parser
.
add_argument
(
'--list'
,
action
=
'store_const'
,
const
=
True
,
default
=
False
,
help
=
'Only list available experiment names'
)
parser
.
add_argument
(
'--filter'
,
metavar
=
'PATTERN'
,
type
=
str
,
nargs
=
'+'
,
parser
.
add_argument
(
'--filter'
,
metavar
=
'PATTERN'
,
type
=
str
,
nargs
=
'+'
,
help
=
'Pattern to match experiment names against'
)
help
=
'Pattern to match experiment names against'
)
parser
.
add_argument
(
'--pickled'
,
action
=
'store_const'
,
const
=
True
,
parser
.
add_argument
(
'--pickled'
,
action
=
'store_const'
,
const
=
True
,
...
@@ -188,6 +190,11 @@ if not args.pickled:
...
@@ -188,6 +190,11 @@ if not args.pickled:
spec
.
loader
.
exec_module
(
mod
)
spec
.
loader
.
exec_module
(
mod
)
experiments
+=
mod
.
experiments
experiments
+=
mod
.
experiments
if
args
.
list
:
for
e
in
experiments
:
print
(
e
.
name
)
sys
.
exit
(
0
)
for
e
in
experiments
:
for
e
in
experiments
:
if
args
.
auto_dist
and
not
isinstance
(
e
,
exp
.
DistributedExperiment
):
if
args
.
auto_dist
and
not
isinstance
(
e
,
exp
.
DistributedExperiment
):
e
=
runtime
.
auto_dist
(
e
,
executors
,
args
.
proxy_type
)
e
=
runtime
.
auto_dist
(
e
,
executors
,
args
.
proxy_type
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment