batch-inference

Automate batch inference scoring millions of rows into partitioned Parquet files.

5|Updated Nov 18, 2025
One-click install
npx skills add https://github.com/DuqueOM/ML-MLOps-Portfolio --skill batch-inference
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: batch-inference
Source: https://github.com/DuqueOM/ML-MLOps-Portfolio/tree/main/.devin/skills/batch-inference
Command: npx skills add https://github.com/DuqueOM/ML-MLOps-Portfolio --skill batch-inference

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Batch inference reuses the service's feature engineering and model artifact to score millions of rows in a single run, avoiding real-time API latency.

Core Features & Use Cases

  • Shared predict path between real-time and batch modes to ensure consistency and reduce drift.
  • Output is partitioned Parquet with fields: prediction_id, entity_id, model_version, prediction_score, timestamp for easy downstream consumption.
  • Scheduling, backfill, and monitoring via Kubernetes CronJob to run nightly or per Schedule with guardrails and observability.

Quick Start

Provide the service name and code path, then run the scaffold to generate batch.py and cronjob YAML.

Frequently Asked Questions about batch-inference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate batch inference for millions of rows without real-time API latency?

Batch inference scores millions of rows in a single run by reusing your service's feature engineering and model artifacts. It outputs partitioned Parquet files to avoid the latency overhead of real-time API calls.

Can I schedule periodic batch predictions using a Kubernetes CronJob?

Yes, you can schedule periodic batch predictions using a Kubernetes CronJob. The generated scaffold provides the necessary YAML to run nightly scoring or backfill historical data with built-in guardrails and observability.

How do I ensure batch scoring consistency with my real-time predictions?

Batch scoring maintains consistency by sharing the predict path between real-time and batch modes. This shared code path ensures both processes use the exact same feature engineering logic, reducing model drift.

What format does the batch inference output use for downstream consumption?

The batch inference output uses partitioned Parquet files. Each record includes prediction_id, entity_id, model_version, prediction_score, and timestamp fields to ensure easy downstream data consumption and analysis.

Do I need Pandera validation to run batch inference on historical data?

Yes, Pandera validation is required to run batch inference. It validates the feature data before scoring, ensuring that the millions of rows processed during historical backfills meet the expected schema and quality standards.

What's the best way to backfill historical data with periodic model scoring?

The best way to backfill historical data is using a batch runner with a Kubernetes CronJob. This approach processes millions of rows per run, applying shared model artifacts to output partitioned Parquet files efficiently.