Skip to content
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

Add log_path to TorchXRunner #382

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions torchx/runtime/hpo/ax.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def __init__(
component_const_params: Optional[Dict[str, Any]] = None,
scheduler: str = "local",
cfg: Optional[Mapping[str, CfgVal]] = None,
log_path: str = "/",
) -> None:
self._component: Callable[..., AppDef] = component
self._scheduler: str = scheduler
Expand All @@ -175,6 +176,7 @@ def __init__(
self._torchx_runner: Runner = get_runner()
self._tracker_base = tracker_base
self._component_const_params: Dict[str, Any] = component_const_params or {}
self._log_path: str = log_path

def run(self, trial: BaseTrial) -> Dict[str, Any]:
"""
Expand All @@ -198,6 +200,9 @@ def run(self, trial: BaseTrial) -> Dict[str, Any]:
if "tracker_base" in component_args:
parameters["tracker_base"] = self._tracker_base

if "log_path" in component_args:
parameters["log_path"] = self._log_path

appdef = self._component(**parameters)
app_handle = self._torchx_runner.run(appdef, self._scheduler, self._cfg)
return {
Expand Down