Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Add exception handler in trial_keeper (#235)
Browse files Browse the repository at this point in the history
* add exception handling in trial_keeper.py
  • Loading branch information
SparkSnail authored Oct 18, 2018
1 parent 5c63414 commit b29b7e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/trial_tool/trial_keeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def main_loop(args):
print('subprocess terminated. Exit code is {}. Quit'.format(retCode))
#copy local directory to hdfs
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:
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):
print('copy directory from {0} to {1} success!'.format(nni_local_output_dir, args.pai_hdfs_output_dir))
else:
Expand Down

0 comments on commit b29b7e5

Please sign in to comment.