Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Shreyan Chowdhury
moodwalk
Commits
83981c32
Commit
83981c32
authored
Sep 16, 2019
by
Shreyan Chowdhury
Browse files
bug fix in exit_experiment
parent
d4512404
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils.py
View file @
83981c32
...
...
@@ -163,15 +163,17 @@ def init_experiment(comment='', name=None):
# ============================================
def
exit_experiment
(
status
):
def
exit_experiment
(
status
,
exp
):
global
CURR_RUN_PATH
if
status
==
'failed'
:
os
.
rename
(
CURR_RUN_PATH
,
os
.
path
.
join
(
PATH_RESULTS
,
'runs'
,
'failed - '
+
curr_run_name
))
CURR_RUN_PATH
=
os
.
path
.
join
(
PATH_RESULTS
,
'runs'
,
'failed - '
+
curr_run_name
)
elif
status
==
'stopped'
:
os
.
rename
(
CURR_RUN_PATH
,
os
.
path
.
join
(
PATH_RESULTS
,
'runs'
,
'stopped - '
+
curr_run_name
))
CURR_RUN_PATH
=
os
.
path
.
join
(
PATH_RESULTS
,
'runs'
,
'stopped - '
+
curr_run_name
)
else
:
os
.
rename
(
CURR_RUN_PATH
,
os
.
path
.
join
(
PATH_RESULTS
,
'runs'
,
curr_run_name
))
exp
.
save_dir
=
CURR_RUN_PATH
def
write_to_file
(
data
,
path
):
# not fully implemented. unused function as of now.
...
...
Write
Preview
Supports
Markdown
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