Skip to content

Adding Bundle Schemas#100

Open
ericspod wants to merge 5 commits into
masterfrom
add_bundle_schema
Open

Adding Bundle Schemas#100
ericspod wants to merge 5 commits into
masterfrom
add_bundle_schema

Conversation

@ericspod
Copy link
Copy Markdown
Member

@ericspod ericspod commented May 15, 2026

Fixes Project-MONAI/MONAI#4048

This copies the existing schemas stored here into the website itself so these can be accessed through a shorter and permanent URL. The expectation is that the "schema" URL in metadata.json files can use a shorter URL, eg. "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20240725.json" becomes "schema": "https://project-monai.github.io/meta_schema_20240725.json".

Summary by CodeRabbit

  • New Features
    • Added comprehensive metadata validation schemas for MONAI model packages, expanding support for autoencoders, generators, latent/generative workflows, and specialized formats.
    • Standardized tensor/IO descriptors (shape, dtype, channel/patch metadata, value ranges) for consistent model input/output validation.
    • Added schema variants for bundle-level metadata and hosting integrations (including a Hugging Face–focused schema) to improve package discoverability and compatibility.

Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
@ericspod ericspod requested a review from zephyrie May 15, 2026 15:17
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Warning

Rate limit exceeded

@ericspod has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 54 minutes and 28 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1f98eb03-0678-4c0a-bd22-32f06394f6ca

📥 Commits

Reviewing files that changed from the base of the PR and between 5ea5043 and 26078b6.

📒 Files selected for processing (1)
  • meta_schema_20220729.json

Walkthrough

Adds nine JSON Schema files that define and evolve MONAI bundle/model metadata and network I/O descriptions across formats for general models, generators, LDMs, HF integration, and HoverNet.

Changes

MONAI Bundle Metadata Schema Catalog

Layer / File(s) Summary
Foundational bundle schemas
meta_schema_20220324.json, meta_schema_20220729.json
Core 2022 schemas: top-level metadata fields and network_data_format with inputs/outputs; extended variant adds latent support and requires inputs/outputs.
Generator and LDM schemas
meta_schema_generator_20220718.json, meta_schema_generator_ldm_20230507.json
Generator and LDM schemas declare required network_data_format.inputs.latent / outputs.pred and, for LDM, dual autoencoder_data_format and generator_data_format blocks with typed tensor descriptors.
Advanced LDM schema (2024)
meta_schema_generator_ldm_20240318.json
Comprehensive LDM schema with domain-specific input descriptors (e.g., body_region, anatomy_list) and required autoencoder/generator format blocks.
Reusable bundle schema (2024)
meta_schema_20240725.json
Refactored bundle schema using $defs for tensor/argument/result and network_io, and patternProperties to allow multiple _data_format top-level entries.
Platform-specific schemas
meta_schema_hf_20250321.json, meta_schema_hovernet_20221124.json
HuggingFace schema with HF-specific required fields; HoverNet schema with network_data_format and class/eval descriptors.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 In burrows of JSON, schemas bloom,

keys and tensors find their room.
Latents, inputs, outputs aligned,
A rabbit's stamp: metadata defined. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Adding Bundle Schemas' is vague and generic, failing to specify which schemas are being added or their purpose beyond adding schema files. Consider a more specific title such as 'Add bundle metadata JSON schemas to project website' that clarifies the intent and scope of changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The PR successfully adds 6 JSON schema files to make bundle schemas accessible via stable project website URLs instead of GitHub release URLs, directly addressing issue #4048's requirement for easier access.
Out of Scope Changes check ✅ Passed All changes are schema file additions directly supporting the linked issue objective. No unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add_bundle_schema

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@meta_schema_20220729.json`:
- Line 253: The "latent" property line uses a tab for indentation which is
inconsistent with the file's spaces; locate the "latent" key (the JSON property
"latent" shown in the diff) and replace the leading tab characters with the same
number of spaces used elsewhere in the file so indentation style matches the
rest of meta_schema_20220729.json.
- Line 168: Line 168 contains a tab character before the "latent" property which
is inconsistent with the file's spaces-based indentation; replace the tab with
the appropriate number of spaces to match the surrounding JSON nesting (use the
same 4-space multiples used elsewhere) so the "latent" key aligns with its
sibling properties and preserves consistent formatting.

In `@meta_schema_20240725.json`:
- Line 135: Fix the typo in the JSON description value for the metadata field
whose "description" currently reads "Version of NumPy the bundlewas generated
with." — update the string to "Version of NumPy the bundle was generated with."
so there is a space between "bundle" and "was" (edit the "description" property
in the same JSON object).

In `@meta_schema_hf_20250321.json`:
- Around line 3-17: The schema is missing a top-level "type" and "properties"
definition; update the JSON object that currently contains "required" to include
"type": "object" and a "properties" object that defines each required field
(e.g., "schema", "version", "changelog", "monai_version", "pytorch_version",
"numpy_version", "required_packages_version", "name", "task", "description",
"authors", "copyright", "huggingface_url") with appropriate simple types
(string/array/object as applicable) to match the other meta_schema files and
enforce field shapes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e5b59219-c720-4102-bece-4ea18906d79e

📥 Commits

Reviewing files that changed from the base of the PR and between 6345da2 and 0c25c2d.

📒 Files selected for processing (8)
  • meta_schema_20220324.json
  • meta_schema_20220729.json
  • meta_schema_20240725.json
  • meta_schema_generator_20220718.json
  • meta_schema_generator_ldm_20230507.json
  • meta_schema_generator_ldm_20240318.json
  • meta_schema_hf_20250321.json
  • meta_schema_hovernet_20221124.json

Comment thread meta_schema_20220729.json Outdated
Comment thread meta_schema_20220729.json Outdated
Comment thread meta_schema_20240725.json Outdated
Comment thread meta_schema_hf_20250321.json Outdated
ericspod and others added 4 commits May 16, 2026 23:59
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
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.

easier access to the bundle schema

1 participant