Skip to content

feat: require schema v2 and output-major targets - #18

Merged
UlloaSP merged 1 commit into
developfrom
feat/schema-contract-v2
Oct 13, 2026
Merged

UlloaSP merged 1 commit into
developfrom
feat/schema-contract-v2

Conversation

@UlloaSP

@UlloaSP UlloaSP commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Every export now writes required schema v2 through local mlschema inference, using training features or a one-row float default. The schema records its source and bounded one-hot separator. Native model names map by name; all other origins map by zero-based feature position, with generated names starting at feature_0. Reports map by output position and use string display labels while the manifest retains verified original label types.

Replace target_name with output-major target_names, with no alias. Validate one unique bounded name per verified output, exclude every target column from training features/schema/samples, and reject target/feature overlap before publication, including overwrite. The manifest records target.names and validates count/uniqueness; the CLI displays it. Shared field/report/mapping validation remains independent of pandas/mlschema on readers.

Compatibility: bundles written by 0.1.0a1 without schema.json, or with schema version 1, are rejected and must be re-exported. The old target.name wire key and target_name export keyword are also rejected. Format version remains 1 because it is not frozen. Package version is 0.1.0a2; this PR does not publish, tag, release or merge it.

Validation:

  • Ruff lint and formatting, Pyright, 1543 pytest tests with 91.94% branch coverage, wheel and sdist build.
  • Installed mlschema kind/key contract, schema round trips across adapters, positional prediction, one/multiple output targets and all rejection paths.
  • Independent review fixed target-overlap publication ordering and preserved the first-separator grouping rule; the second review passed 100 assertions with no important findings.
  • Wheel/sdist package bytes and isolated base-wheel import/help/inspect smoke passed with all optional libraries absent.

BREAKING CHANGE: Re-export bundles without schema or with schema v1.
Use target_names in export and target.names in the manifest.
Format 1 remains unfrozen; package version becomes 0.1.0a2.
@coderabbitai

coderabbitai Bot commented Oct 13, 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
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6097b0bb-3b68-4c2c-9761-be640a21bd71

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 5e151b2 into develop Oct 13, 2026
10 checks passed
@UlloaSP
UlloaSP deleted the feat/schema-contract-v2 branch October 13, 2026 12:53
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