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
ae40f1c2
"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "aeb2cab1cd593231ef38f80827cb502973825354"
Commit
ae40f1c2
authored
Nov 05, 2020
by
Antoine Kaufmann
Browse files
experiments: add --force parameter to run even if output present
parent
bffe71e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
experiments/run.py
experiments/run.py
+3
-1
No files found.
experiments/run.py
View file @
ae40f1c2
...
@@ -21,6 +21,8 @@ parser.add_argument('--runs', metavar='N', type=int, default=1,
...
@@ -21,6 +21,8 @@ parser.add_argument('--runs', metavar='N', type=int, default=1,
help
=
'Number of repetition for each experiment'
)
help
=
'Number of repetition for each experiment'
)
parser
.
add_argument
(
'--firstrun'
,
metavar
=
'N'
,
type
=
int
,
default
=
1
,
parser
.
add_argument
(
'--firstrun'
,
metavar
=
'N'
,
type
=
int
,
default
=
1
,
help
=
'ID for first run'
)
help
=
'ID for first run'
)
parser
.
add_argument
(
'--force'
,
action
=
'store_const'
,
const
=
True
,
default
=
False
,
help
=
'Run experiments even if output already exists'
)
parser
.
add_argument
(
'--verbose'
,
action
=
'store_const'
,
const
=
True
,
parser
.
add_argument
(
'--verbose'
,
action
=
'store_const'
,
const
=
True
,
default
=
False
,
default
=
False
,
help
=
'Verbose output'
)
help
=
'Verbose output'
)
...
@@ -66,7 +68,7 @@ else:
...
@@ -66,7 +68,7 @@ else:
def
add_exp
(
e
,
run
,
prereq
,
create_cp
,
restore_cp
):
def
add_exp
(
e
,
run
,
prereq
,
create_cp
,
restore_cp
):
outpath
=
'%s/%s-%d.json'
%
(
args
.
outdir
,
e
.
name
,
run
)
outpath
=
'%s/%s-%d.json'
%
(
args
.
outdir
,
e
.
name
,
run
)
if
os
.
path
.
exists
(
outpath
):
if
os
.
path
.
exists
(
outpath
)
and
not
args
.
force
:
print
(
'skip %s run %d'
%
(
e
.
name
,
run
))
print
(
'skip %s run %d'
%
(
e
.
name
,
run
))
return
None
return
None
...
...
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