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
OpenDAS
nni
Commits
b29b7e55
Unverified
Commit
b29b7e55
authored
Oct 18, 2018
by
SparkSnail
Committed by
GitHub
Oct 18, 2018
Browse files
Add exception handler in trial_keeper (#235)
* add exception handling in trial_keeper.py
parent
5c634149
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tools/trial_tool/trial_keeper.py
tools/trial_tool/trial_keeper.py
+1
-1
No files found.
tools/trial_tool/trial_keeper.py
View file @
b29b7e55
...
@@ -54,8 +54,8 @@ def main_loop(args):
...
@@ -54,8 +54,8 @@ def main_loop(args):
print
(
'subprocess terminated. Exit code is {}. Quit'
.
format
(
retCode
))
print
(
'subprocess terminated. Exit code is {}. Quit'
.
format
(
retCode
))
#copy local directory to hdfs
#copy local directory to hdfs
nni_local_output_dir
=
os
.
environ
[
'NNI_OUTPUT_DIR'
]
nni_local_output_dir
=
os
.
environ
[
'NNI_OUTPUT_DIR'
]
hdfs_client
=
HdfsClient
(
hosts
=
'{0}:{1}'
.
format
(
args
.
pai_hdfs_host
,
'50070'
),
user_name
=
args
.
pai_user_name
,
timeout
=
5
)
try
:
try
:
hdfs_client
=
HdfsClient
(
hosts
=
'{0}:{1}'
.
format
(
args
.
pai_hdfs_host
,
'50070'
),
user_name
=
args
.
pai_user_name
,
timeout
=
5
)
if
copyDirectoryToHdfs
(
nni_local_output_dir
,
args
.
pai_hdfs_output_dir
,
hdfs_client
):
if
copyDirectoryToHdfs
(
nni_local_output_dir
,
args
.
pai_hdfs_output_dir
,
hdfs_client
):
print
(
'copy directory from {0} to {1} success!'
.
format
(
nni_local_output_dir
,
args
.
pai_hdfs_output_dir
))
print
(
'copy directory from {0} to {1} success!'
.
format
(
nni_local_output_dir
,
args
.
pai_hdfs_output_dir
))
else
:
else
:
...
...
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