Skip to content

Commit

Permalink
Fixing CLI commands fail when mount option not present. (#341)
Browse files Browse the repository at this point in the history
The parser checks if certain CLI arguments present before accessing them. One of previous commits that introduced new `mount` options was not checking for this, and was accessing mount option directly. That was causing no such key error. This commit fixes it.
  • Loading branch information
sergey-serebryakov authored Aug 18, 2023
1 parent 394a301 commit 5bef920
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mlcube/mlcube/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ def parse_extra_arg(
if parsed_args.get("cpu", None):
key = "--cpuset-cpus" if platform == "docker" else "--vm-cpu"
runner_run_args[key] = parsed_args["cpu"]
runner_run_args["--mount_opts"] = parsed_args["mount"]
if parsed_args.get("mount", None):
runner_run_args["--mount_opts"] = parsed_args["mount"]

mlcube_args.merge_with({platform: runner_run_args})

Expand Down

0 comments on commit 5bef920

Please sign in to comment.