From ff3304fbf3a57e9a7529c0a99b0cfd2a4972ae46 Mon Sep 17 00:00:00 2001 From: Ander Alvarez Sanz <104446704+aalvsz@users.noreply.github.com> Date: Wed, 19 Aug 2026 00:01:06 +0200 Subject: [PATCH 1/3] Refresh CI actions and test CLI plans --- .github/workflows/ci.yml | 18 +++++++++--------- README.md | 7 +++++++ tests/test_cli.py | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 tests/test_cli.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d76dd6..b0d0ebf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,8 +18,8 @@ jobs: name: Quality runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v6 + - uses: actions/checkout@v7 + - uses: astral-sh/setup-uv@v10 with: python-version: "3.11" enable-cache: true @@ -35,8 +35,8 @@ jobs: matrix: python-version: ["3.11", "3.12", "3.13", "3.14"] steps: - - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v6 + - uses: actions/checkout@v7 + - uses: astral-sh/setup-uv@v10 with: python-version: ${{ matrix.python-version }} enable-cache: true @@ -48,8 +48,8 @@ jobs: name: Tiny reference lifecycle / CPU runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v6 + - uses: actions/checkout@v7 + - uses: astral-sh/setup-uv@v10 with: python-version: "3.11" enable-cache: true @@ -66,14 +66,14 @@ jobs: name: Build distributions runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v6 + - uses: actions/checkout@v7 + - uses: astral-sh/setup-uv@v10 with: python-version: "3.11" enable-cache: true - run: uv build - run: uvx twine check dist/* - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: distributions path: dist/* diff --git a/README.md b/README.md index 8c71f3e..7105e33 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,13 @@ pytest -q The reference result explicitly labels itself a mathematical/orchestration smoke test. It is not evidence for quality, distributed correctness, throughput, mixed precision, or CUDA-kernel compatibility. +Plans for every backend can also be generated and inspected without installing an NVIDIA package: + +```bash +llm-lifecycle demo --backend automodel --output runs/automodel-plan +llm-lifecycle demo --backend megatron_bridge --output runs/bridge-plan +``` + ## NeMo AutoModel ```python diff --git a/tests/test_cli.py b/tests/test_cli.py new file mode 100644 index 0000000..0c023dc --- /dev/null +++ b/tests/test_cli.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +import json +from pathlib import Path + +import pytest + +from llm_lifecycle.cli import main + + +@pytest.mark.parametrize( + ("backend", "expected_executors"), + [ + ("reference", ["reference"]), + ("automodel", ["nemo-automodel", "nemo-automodel", "nemo-rl"]), + ("megatron_bridge", ["megatron-bridge", "megatron-bridge", "nemo-rl"]), + ], +) +def test_demo_materializes_each_backend_without_optional_packages( + tmp_path: Path, + capsys: pytest.CaptureFixture[str], + backend: str, + expected_executors: list[str], +) -> None: + output = tmp_path / backend + + assert main(["demo", "--backend", backend, "--output", str(output)]) == 0 + + document = json.loads((output / "manifest.json").read_text(encoding="utf-8")) + assert document["manifest"]["model"]["backend"] == backend + assert [stage["executor"] for stage in document["stages"]] == expected_executors + assert len(list(output.glob("stage-*-*.*"))) == len(expected_executors) + assert capsys.readouterr().out.strip() == str(output.resolve()) From 982f9c2b146c543f4d0cecba4838cb532e2db79d Mon Sep 17 00:00:00 2001 From: Ander Alvarez Sanz <104446704+aalvsz@users.noreply.github.com> Date: Wed, 19 Aug 2026 00:02:43 +0200 Subject: [PATCH 2/3] Use supported setup-uv action tag --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0d0ebf..48d3f06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: astral-sh/setup-uv@v10 + - uses: astral-sh/setup-uv@v7 with: python-version: "3.11" enable-cache: true @@ -36,7 +36,7 @@ jobs: python-version: ["3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v7 - - uses: astral-sh/setup-uv@v10 + - uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.python-version }} enable-cache: true @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: astral-sh/setup-uv@v10 + - uses: astral-sh/setup-uv@v7 with: python-version: "3.11" enable-cache: true @@ -67,7 +67,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: astral-sh/setup-uv@v10 + - uses: astral-sh/setup-uv@v7 with: python-version: "3.11" enable-cache: true From dbe69c6e430204c069ae83345720112e46277008 Mon Sep 17 00:00:00 2001 From: Ander Alvarez Sanz <104446704+aalvsz@users.noreply.github.com> Date: Wed, 19 Aug 2026 00:04:10 +0200 Subject: [PATCH 3/3] Separate CI cache keys --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48d3f06..1020535 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,7 @@ jobs: with: python-version: "3.11" enable-cache: true + cache-suffix: quality - run: uv sync --extra dev - run: uv run ruff check src tests examples - run: uv run mypy src @@ -40,6 +41,7 @@ jobs: with: python-version: ${{ matrix.python-version }} enable-cache: true + cache-suffix: core-${{ matrix.python-version }} - run: uv sync --extra dev - run: uv run pytest -q - run: uv run python -m compileall -q src tests examples @@ -53,6 +55,7 @@ jobs: with: python-version: "3.11" enable-cache: true + cache-suffix: reference-cpu - run: uv venv --python 3.11 - name: Install CPU-only PyTorch run: uv pip install torch --index-url https://download.pytorch.org/whl/cpu @@ -71,6 +74,7 @@ jobs: with: python-version: "3.11" enable-cache: true + cache-suffix: build - run: uv build - run: uvx twine check dist/* - uses: actions/upload-artifact@v7