Skip to content
Open
Show file tree
Hide file tree
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: 6 additions & 1 deletion nemo_run/run/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@
from typing import Optional, TextIO

from torchx.cli.cmd_log import _prefix_line, find_role_replicas, validate
from torchx.cli.colors import ENDC, GREEN
from torchx.schedulers.api import Stream
from torchx.specs.api import is_started, parse_app_handle
from torchx.specs.builders import make_app_handle
from torchx.util.types import none_throws

# TorchX moved color constants from `torchx.cli.colors` to `torchx.util.colors` on main.
try:
from torchx.util.colors import ENDC, GREEN
except ImportError: # pragma: no cover - compatibility with older TorchX releases
from torchx.cli.colors import ENDC, GREEN

from nemo_run.core.execution.base import LogSupportedExecutor
from nemo_run.core.frontend.console.api import CONSOLE
from nemo_run.run.torchx_backend.runner import Runner, get_runner
Expand Down
8 changes: 7 additions & 1 deletion nemo_run/run/torchx_backend/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import inspect
import logging
from typing import Any, Optional

Expand Down Expand Up @@ -63,7 +64,12 @@ def dryrun( # type: ignore
with log_event("dryrun", scheduler):
sched = self._scheduler(scheduler)

sched._validate(app, scheduler)
# TorchX `main` added `cfg` to `_validate`; older versions only accept
# `(app, scheduler)`. Support both signatures.
if "cfg" in inspect.signature(sched._validate).parameters:
sched._validate(app, scheduler, cfg)
else:
sched._validate(app, scheduler)
dryrun_info = sched.submit_dryrun(app, cfg)
dryrun_info._scheduler = scheduler
return dryrun_info
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@ dependencies = [
"catalogue>=2.0.10",
"fabric>=3.2.2",
"fiddle>=0.3.0",
"torchx>=0.7.0",
"torchx @ git+https://github.com/meta-pytorch/torchx.git@main",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks PyPi compatibility. We can use uv.sources to override with a vcs dependency in uv-environments only

"typer>=0.12.3",
"rich>=13.7.1",
"jinja2>=3.1.4",
"cryptography < 43.0.0",
"importlib-metadata",
"cryptography",
"networkx >= 3.3",
"omegaconf>=2.3.0",
"leptonai>=0.26.6",
"packaging",
"toml",
"urllib3>=2.6.3",
]
readme = "README.md"
requires-python = ">= 3.10"
Expand Down
87 changes: 26 additions & 61 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading