Skip to content

Use stock python image for KFP & add package installation to components.#49

Merged
dmaniloff merged 3 commits intotrustyai-explainability:mainfrom
dmaniloff:use-stock-python-image
Dec 18, 2025
Merged

Use stock python image for KFP & add package installation to components.#49
dmaniloff merged 3 commits intotrustyai-explainability:mainfrom
dmaniloff:use-stock-python-image

Conversation

@dmaniloff
Copy link
Copy Markdown
Collaborator

@dmaniloff dmaniloff commented Dec 17, 2025

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Dec 17, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Switches Kubeflow components to use a stock UBI Python 3.12 base image and ensures the Ragas provider package is installed at runtime via Kubeflow’s packages_to_install mechanism.

Sequence diagram for Kubeflow component startup with packages_to_install

sequenceDiagram
    participant KFP as KubeflowPipelines
    participant K8s as Kubernetes
    participant Pod as ComponentPod
    participant ImgReg as UBI_Python_Image_Registry
    participant Pip as PipInstaller
    participant Comp as ComponentCode

    KFP->>K8s: Create Pod for retrieve_data_from_llama_stack
    KFP->>K8s: Create Pod for run_ragas_evaluation

    K8s->>ImgReg: Pull DEFAULT_RAGAS_PROVIDER_IMAGE
    ImgReg-->>K8s: UBI Python 3.12 image
    K8s-->>Pod: Start container with base_image

    Pod->>Pip: Install packages_to_install
    Pip-->>Pod: llama-stack-provider-ragas[remote] installed

    Pod->>Comp: Execute component entrypoint
    Comp-->>KFP: Component task completes
Loading

File-Level Changes

Change Details Files
Configure Kubeflow components to install the Ragas provider package at runtime.
  • Add packages_to_install argument to retrieve_data_from_llama_stack component decorator to install llama-stack-provider-ragas[remote].
  • Add packages_to_install argument to run_ragas_evaluation component decorator to install llama-stack-provider-ragas[remote].
src/llama_stack_provider_ragas/remote/kubeflow/components.py
Change the default base image used for Ragas Kubeflow components to a stock UBI Python 3.12 image.
  • Update DEFAULT_RAGAS_PROVIDER_IMAGE to registry.access.redhat.com/ubi9/python-312:latest while preserving existing ConfigMap-based override mechanism.
src/llama_stack_provider_ragas/constants.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • The packages_to_install=["llama-stack-provider-ragas[remote]"] list is duplicated across components; consider extracting it into a shared constant to avoid drift if it ever changes.
  • Using :latest for the DEFAULT_RAGAS_PROVIDER_IMAGE reduces reproducibility of Kubeflow runs; consider pinning to a specific image tag or digest instead.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `packages_to_install=["llama-stack-provider-ragas[remote]"]` list is duplicated across components; consider extracting it into a shared constant to avoid drift if it ever changes.
- Using `:latest` for the `DEFAULT_RAGAS_PROVIDER_IMAGE` reduces reproducibility of Kubeflow runs; consider pinning to a specific image tag or digest instead.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Member

@tarilabs tarilabs left a comment

Choose a reason for hiding this comment

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

/lgtm

@dmaniloff dmaniloff merged commit 7bc708b into trustyai-explainability:main Dec 18, 2025
4 checks passed
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