Skip to content
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
7 changes: 7 additions & 0 deletions torchx/specs/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
# (most recent call first):
_EMBEDDED_ERROR_MESSAGE_RE: Pattern[str] = re.compile(r"(?P<msg>.+)\nException.*")

YELLOW_BOLD = "\033[1;33m"
RESET = "\033[0m"


# ========================================
# ==== Distributed AppDef API =======
Expand Down Expand Up @@ -937,6 +940,10 @@ def _cast_to_type(value: str, opt_type: Type[CfgVal]) -> CfgVal:
runopt_ = self.get(key)
if runopt_:
cfg[key] = _cast_to_type(val, runopt_.opt_type)
else:
logger.warning(
f"{YELLOW_BOLD}Unknown run option passed to scheduler: {key}={val}{RESET}"
)
return cfg

def cfg_from_json_repr(self, json_repr: str) -> Dict[str, CfgVal]:
Expand Down
Loading