Skip to content

Command format fix with backslashes on Windows System #5280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions monai/apps/auto3dseg/bundle_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import subprocess
import sys
from copy import deepcopy
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Any, Dict, List, Mapping

Expand All @@ -28,7 +29,7 @@
from monai.utils import ensure_tuple

logger = get_logger(module_name=__name__)
ALGO_HASH = os.environ.get("MONAI_ALGO_HASH", "004a63c")
ALGO_HASH = os.environ.get("MONAI_ALGO_HASH", "d7bf36c")

__all__ = ["BundleAlgo", "BundleGen"]

Expand Down Expand Up @@ -152,7 +153,8 @@ def _create_cmd(self, train_params=None):
base_cmd += f"{train_py} run --config_file="
else:
base_cmd += "," # Python Fire does not accept space
config_yaml = os.path.join(config_dir, file)
# Python Fire may be confused by single-quoted WindowsPath
config_yaml = Path(os.path.join(config_dir, file)).as_posix()
base_cmd += f"'{config_yaml}'"

if "CUDA_VISIBLE_DEVICES" in params:
Expand Down