Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Kubeflow Pipelines XGBoost Predict On CSV Op

From Leeroopedia
Sources Domains Last Updated
Kubeflow Pipelines, XGBoost Machine_Learning, Inference 2026-02-13

Overview

Reusable KFP component for generating predictions using a trained XGBoost model on CSV data.

Description

Wrapper Doc. xgboost_predict_on_csv_op is loaded from a remote YAML spec. It takes CSV data and a trained XGBoost model, runs inference, and outputs predictions in CSV format.

Usage

Use after training to evaluate or validate model performance within a pipeline.

Code Reference

Source Location: Repository: kubeflow/pipelines, File: samples/core/XGBoost/xgboost_sample.py (L13-15 loading, L42-46 invocation)

Signature:

xgboost_predict_on_csv_op = components.load_component_from_url(
    'https://raw.githubusercontent.com/kubeflow/pipelines/.../components/XGBoost/Predict/component.yaml'
)
xgboost_predict_on_csv_op(
    data: CSV,
    model: XGBoostModel,
    label_column: int,
) -> output  # CSV predictions

Import: from kfp import components

I/O Contract

Inputs

Name Type Required Description
data CSV Yes Input data
model XGBoostModel Yes Trained model
label_column int Yes Target column index

Outputs

Name Type Description
output CSV Prediction results

Usage Examples

xgboost_predict_on_csv_op(
    data=training_data_csv,
    model=model_trained_on_csv,
    label_column=0,
).set_memory_limit('1Gi')

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment