Skip to content

fix: lock pandas for pipelines that select columns by name - #26

Merged
UlloaSP merged 2 commits into
developfrom
fix/lock-pandas-frame-input
Oct 28, 2026
Merged

UlloaSP merged 2 commits into
developfrom
fix/lock-pandas-frame-input

Conversation

@UlloaSP

@UlloaSP UlloaSP commented Oct 28, 2026

Copy link
Copy Markdown
Owner

A pipeline whose ColumnTransformer selects columns by name takes its rows as a DataFrame at prediction time, so it needs pandas. Since 0.3.0 its lock never included pandas (scikit-learn and XGBoost locks), so an environment built from just the lock plus mlbundle passed check_environment and then failed every prediction with MissingOptionalDependencyError. MLsuite found it rebuilding environments from a corpus of 168 bundles.

  • Export pins pandas at its installed version for such bundles; the rule reads the existing, verified pipeline hyperparameters, so no new manifest field.
  • The shared lock binding (export, inspect, load) rejects a lock without pandas for them, instead of failing at prediction.
  • Plain models stay without pandas.
  • Docs (format-environment binding list, export and records guides, README) updated.
  • Releases 0.3.1. Existing 0.3.0 bundles of that kind need re-export.

🤖 Generated with Claude Code

A scikit-learn or composite pipeline whose ColumnTransformer selects
columns by name predicts records from a pandas DataFrame, but the
runtime lock only rooted pydantic and the model libraries. An
environment built from such a lock passed check_environment and then
failed predict_record with MissingOptionalDependencyError.

runtime_requirements now derives the model's distribution groups from
the manifest's model record and adds pandas when the sklearn (or
composite transformer) hyperparameters hold a by-name ColumnTransformer.
The hyperparameters are an existing claim that load recomputes, so the
rule needs no new manifest field. Export generates the lock after the
model record is complete, and the shared binding in export, inspect
and load rejects a lock without pandas for such bundles.
Publishes the pandas lock fix: bundles whose pipelines select columns by
name now lock pandas, which their predictions need.
@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 09cf2f25-fb25-4374-93a6-055db47bd66d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@UlloaSP
UlloaSP merged commit 734d4e0 into develop Oct 28, 2026
12 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.

1 participant