Skip to content

chore: bump Llama Stack version to 0.2.21#23

Merged
Elbehery merged 3 commits intoopendatahub-io:mainfrom
nathan-weinberg:bump-lls
Sep 11, 2025
Merged

chore: bump Llama Stack version to 0.2.21#23
Elbehery merged 3 commits intoopendatahub-io:mainfrom
nathan-weinberg:bump-lls

Conversation

@nathan-weinberg
Copy link
Copy Markdown
Collaborator

@nathan-weinberg nathan-weinberg commented Sep 11, 2025

to align with d/s change

Summary by CodeRabbit

  • New Features

    • Added a local filesystem-backed file store for distribution meta-reference data in runtime configuration.
  • Chores

    • Upgraded core stack dependency to 0.2.21 across build and tooling.
    • Updated container build to install CPU PyTorch wheels, include torchao (>=0.12), and bump datasets (>=4.0).
    • Refreshed pre-commit hook to align with the new stack version.

to align with d/s change

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Sep 11, 2025

Walkthrough

Dependency and build script updates plus a runtime provider addition: llama-stack bumped to 0.2.21 across config/build files; Containerfile switches to PyTorch CPU wheels via an extra-index-url, adds torchao>=0.12.0, and upgrades datasets>=4.0.0; distribution/build.py now treats --extra-index-url like --index-url when composing install commands; distribution/run.yaml adds a local filesystem-backed provider for meta-reference files with a SQLite metadata store.

Changes

Cohort / File(s) Change Summary
Llama-stack version bump
\.pre-commit-config.yaml, distribution/Containerfile.in, distribution/build.py, distribution/Containerfile
Update llama-stack from 0.2.18 to 0.2.21 in multiple build/config files; no API/signature changes.
Container build dependency updates
distribution/Containerfile
Switch PyTorch installation to CPU wheels via --extra-index-url (installing torch, torchvision, torchao>=0.12.0); remove previous PyTorch --index-url line; set datasets>=4.0.0; install llama-stack 0.2.21 with --no-cache.
Dependency command composition
distribution/build.py
Broadened handling so lines containing --extra-index-url are treated like --index-url when constructing full pip install commands (now forming single-line commands for those cases).
Runtime provider addition
distribution/run.yaml
Add new tool_runtime provider group files containing provider meta-reference-files of type inline::localfs with storage_dir: /opt/app-root/src/.llama/distributions/rh/files and sqlite metadata_store at /opt/app-root/src/.llama/distributions/rh/files_metadata.db. Existing registry metadata_store unchanged.

Sequence Diagram(s)

sequenceDiagram
  participant Build as distribution/build.py
  participant ReqFile as requirements / Containerfile deps
  participant Pip as pip installer

  Note over Build,ReqFile: build.py composes install commands
  ReqFile->>Build: provide dependency lines (may include --index-url or --extra-index-url)
  Build->>Pip: emit single-line pip install (treats --extra-index-url like --index-url)
  Pip-->>Build: packages installed (torch, torchvision, torchao, datasets, llama-stack)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

I nibble versions, stitch the build’s new thread,
Wheels swap shelves, and files find a bed.
SQLite whispers, metadata tucked away,
A rabbit hops—CI munches on the day. 🐇✨

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "chore: bump Llama Stack version to 0.2.21" is concise and accurately reflects the primary change in the diff (llama-stack version updated in .pre-commit-config.yaml, distribution/build.py, and Containerfile(.in)). Although the PR also contains related build/config updates (PyTorch index change, datasets bump, and a new local file provider), those appear secondary to the stated version bump, so the title appropriately communicates the main intent.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
distribution/Containerfile (1)

8-13: Use --index-url (not --extra-index-url) for PyTorch CPU wheels.

This avoids mixed resolution and follows PyTorch install guidance for CPU wheels.

-RUN pip install \
-    --extra-index-url \
-    https://download.pytorch.org/whl/cpu \
-    torch \
-    torchao>=0.12.0 \
-    torchvision
+RUN pip install \
+    --index-url https://download.pytorch.org/whl/cpu \
+    torch \
+    torchao>=0.12.0 \
+    torchvision

Reference install docs show CPU installs via --index-url. (docs.pytorch.org)

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d50ebe and 21fe35b.

📒 Files selected for processing (4)
  • .pre-commit-config.yaml (1 hunks)
  • distribution/Containerfile (2 hunks)
  • distribution/Containerfile.in (1 hunks)
  • distribution/build.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-test-push (linux/amd64)
🔇 Additional comments (5)
.pre-commit-config.yaml (1)

59-59: LLM stack pin updated in local hook — verified.
No remaining llama-stack==0.2.18 occurrences; all pins are 0.2.21 in distribution/Containerfile.in:6, distribution/Containerfile:48, distribution/build.py:16.

distribution/build.py (1)

16-16: Pin bumped to 0.2.21 — aligned with repo.

Matches .pre-commit and Containerfiles; version guard will enforce consistency.

distribution/Containerfile.in (1)

6-6: Container build pin updated — OK.

Keeps the generated image in lockstep with tooling.

distribution/Containerfile (2)

18-18: datasets>=4.0.0 update — fine with Python 3.12 base.

No concerns from the container side.


48-48: llama-stack 0.2.21 in image — good.

Pin matches tooling; reproducible build maintained.

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
distribution/build.py (1)

79-96: Bug: sorting tokens breaks --index-url/--extra-index-url flag–argument pairing.

Sorting the tail “packages” fragment reorders --index-url|--extra-index-url and their URL arguments, which can corrupt the install command. Preserve original ordering when these flags are present.

Apply this minimal fix:

-                    packages = sorted(
-                        set(parts[3].split())
-                    )  # Sort the package names and remove duplicates
+                    rest = parts[3].strip()
@@
-                    if ("--index-url" in line) or ("--extra-index-url" in line):
-                        full_cmd = " ".join(cmd_parts + [" ".join(packages)])
+                    if ("--index-url" in line) or ("--extra-index-url" in line):
+                        # Preserve original ordering to keep flag-argument pairs intact
+                        full_cmd = " ".join(cmd_parts + [rest])
                         torch_deps.append(full_cmd)
-                    elif "--no-deps" in line:
-                        full_cmd = " ".join(cmd_parts + [" ".join(packages)])
+                    elif "--no-deps" in line:
+                        full_cmd = " ".join(cmd_parts + [rest])
                         no_deps.append(full_cmd)
-                    elif "--no-cache" in line:
-                        full_cmd = " ".join(cmd_parts + [" ".join(packages)])
+                    elif "--no-cache" in line:
+                        full_cmd = " ".join(cmd_parts + [rest])
                         no_cache.append(full_cmd)
                     else:
-                        formatted_packages = " \\\n    ".join(packages)
+                        packages = sorted(set(rest.split()))
+                        formatted_packages = " \\\n    ".join(packages)
                         full_cmd = f"{' '.join(cmd_parts)} \\\n    {formatted_packages}"
                         standard_deps.append(full_cmd)

Optional hardening (future): tokenize with shlex.split and keep a small set of “option-with-arg” flags to preserve their adjacency.

🧹 Nitpick comments (1)
distribution/run.yaml (1)

109-116: Confirm schema: ‘files’ providers may require listing ‘files’ in top-level apis (or nesting under the correct API).

If “files” is its own API, add it to apis:; if it’s intended under tool_runtime, restructure accordingly. Validate with llama stack validate/build.

Proposed addition (if “files” is an API):

 apis:
   - agents
   - datasetio
   - eval
   - inference
   - safety
   - scoring
   - telemetry
   - tool_runtime
   - vector_io
+  - files
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a86a399 and 7763ed7.

📒 Files selected for processing (3)
  • distribution/Containerfile (2 hunks)
  • distribution/build.py (2 hunks)
  • distribution/run.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • distribution/Containerfile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-test-push (linux/amd64)
🔇 Additional comments (1)
distribution/build.py (1)

16-17: Approve — bump to llama-stack==0.2.21 applied repo‑wide.
All 'llama-stack==' occurrences point to 0.2.21: .pre-commit-config.yaml:59; distribution/Containerfile.in:6; distribution/Containerfile:43; distribution/build.py:16 (detection at 42).

@Elbehery
Copy link
Copy Markdown
Collaborator

/lgtm

@Elbehery Elbehery merged commit 6a6ae07 into opendatahub-io:main Sep 11, 2025
5 checks passed
@nathan-weinberg nathan-weinberg deleted the bump-lls branch September 11, 2025 17:39
Elbehery pushed a commit that referenced this pull request Dec 8, 2025
feat(build): add konflux dockerfile and conf file
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.

3 participants