Skip to content

[codex] Make Lepton dependency optional#511

Draft
hemildesai wants to merge 1 commit intomainfrom
codex/lepton-optional-dependency
Draft

[codex] Make Lepton dependency optional#511
hemildesai wants to merge 1 commit intomainfrom
codex/lepton-optional-dependency

Conversation

@hemildesai
Copy link
Copy Markdown
Contributor

Summary

  • Move leptonai out of the base dependency set and into a new lepton extra.
  • Guard Lepton SDK and Ray helper imports so base nemo_run imports, scheduler mappings, and Ray wrapper modules do not require leptonai.
  • Add tests that simulate leptonai being unavailable and skip Lepton-specific tests when the optional SDK is not installed.
  • Update the docs install snippet for DGX Cloud Lepton to use the new extra.

Validation

  • uv lock --check
  • uv run --group lint -- ruff check nemo_run test/core/execution/test_lepton.py test/core/execution/test_lepton_optional_dependency.py test/run/ray/test_lepton.py
  • uv run --group lint -- ruff format --check nemo_run test/core/execution/test_lepton.py test/core/execution/test_lepton_optional_dependency.py test/run/ray/test_lepton.py
  • uv run -- pytest test/core/execution/test_lepton_optional_dependency.py
  • uv run --extra lepton -- pytest test/core/execution/test_lepton.py test/run/ray/test_lepton.py

Note: the Lepton/Ray test command passed, then Ray printed an ignored ModuleNotFoundError: No module named 'ray.dag' from an atexit shutdown callback after pytest completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant