Skip to content

Commit

Permalink
fix python open issue with non-exist parent dir (#1441)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomcli authored and k8s-ci-robot committed Jun 5, 2019
1 parent ab97d57 commit 0ad6c28
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/kubeflow/katib-launcher/src/launch_study_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ def main(argv=None):
if wait_response.get("status", {}).get("condition") == "Completed":
succ = True
trial = get_best_trial(wait_response["status"]["bestTrialId"])
if not os.path.exists(os.path.dirname(args.outputfile)):
os.makedirs(os.path.dirname(args.outputfile))
with open(args.outputfile, 'w') as f:
ps_dict = {}
for ps in trial.parameter_set:
Expand Down

0 comments on commit 0ad6c28

Please sign in to comment.