Skip to content

DO NOT MERGE — review-only mirror of #36 - #47

Closed
vboussot wants to merge 7 commits into
review/before-36from
review/after-36
Closed

DO NOT MERGE — review-only mirror of #36#47
vboussot wants to merge 7 commits into
review/before-36from
review/after-36

Conversation

@vboussot

Copy link
Copy Markdown
Member

Do not merge. Close this once the review is read.

#36 was merged on 14 July, before CodeRabbit was installed, so it refuses it: "Review failed — The pull request is closed." A merged pull request has no diff left to comment on.

This carries the same diff on two throwaway branches so the review can happen:

base review/before-36main as it stood before #36 (1fbce78~7)
head review/after-36 — the last of its seven commits (1fbce78)
diff 179 files, +29,799 −168 — the same figures #36 reports

Merging this would only fast-forward a throwaway branch. The code is already in main; anything found here goes out as its own fix.

@coderabbitai full review

vboussot added 7 commits July 14, 2026 15:56
…ridge

Reorganise builtin models under konfai/models/{python,yaml} and ship a declarative YAML model
catalog resolved via 'classpath: default|<Name>.yml' and packaged in the wheel: UNet, NestedUNet,
ResNet (weight-exact vs the KonfAI classes), SegResNet/VNet/DynUNet/ResNet18/VGG16/PlainConvUNet
(weight-exact vs MONAI/torchvision/nnU-Net, real pretrained weights load through the new
konfai.utils.pretrained execution-order bridge), a parametric PlainConvUNet for any nnU-Net topology,
an SMP encoder-backed wrapper, the MIND descriptor, and the ClipNormalize block. The model-builder
registry grows curated primitives (norms, activations, transformer blocks); the classpath resolver is
re-rooted to konfai.models.python (short form unchanged). Also folds the mixed-accumulation
double-backward fix and the point-of-use SimpleITK guard that touch network.py/blocks.py.

BREAKING CHANGE: fully-qualified references 'konfai.models.<task>.<Module>:<Class>' become
'konfai.models.python.<task>.<Module>:<Class>' (no compatibility alias).
FocalLoss batch>1 broadcast, BEST-checkpoint optimisation direction, OneHot.inverse batched argmax,
Literal defaults, SLURM rendezvous host, ConvNeXt LayerScaler, DDP shard tail, load_state_dict shrink,
and a --resubmit warning instead of a silently dropped flag. SimpleITK is guarded at point-of-use so
the package imports without the itk extra. Comments unified in English and SPDX headers completed
(incl. the app CLI wrappers); the Slicer-facing core API surface is locked by contract tests.
A runnable synthetic-data registration example (train/predict/evaluate on the builtin VoxelMorph),
and the Segmentation and Synthesis examples now ship their model in both a declarative YAML and an
equivalent Python form (verified weight-identical), with READMEs explaining when each form applies.
Surface task/finetunable/optional-input defaults on app repositories (relayed over the remote
server), so an agent can route to a published app, fine-tune it, or run it from its declared
inputs; the get_parameters values/constraints contract is locked by tests.
A FastMCP server exposing the full KonfAI loop to LLM agents: dataset discovery/inspection,
config authoring with static review and side-effect-free semantic validation in a spawn
subprocess, tracked train/predict/evaluate jobs with process-group cancel and traceback-faithful
logs, run comparison and leaderboards, published-app integration (describe/infer/fine-tune), and a
first-class model catalog (list/inspect a default|<Name>.yml or session model; guidance that
prefers the proven catalog and explains what the KonfAI contract buys). Independent package with its
own pyproject and CI.
Unit and integration tests for the MCP tools (dataset, config authoring/validation, jobs,
apps, catalog discovery) plus a segmentation end-to-end pipeline and a tool-index anti-drift check.
A problem-led MCP usage page, the konfai-experiments agent skill (canonical loop + generated
tool reference), and the AGENTS.md guidance for working on the MCP server.
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 179 files, which is 29 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to Pro+ to raise the limit.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dfe2c68e-65e5-4144-90a4-d3e0351e51e5

📥 Commits

Reviewing files that changed from the base of the PR and between 83ffe25 and 1fbce78.

📒 Files selected for processing (179)
  • .claude/skills/konfai-experiments/SKILL.md
  • .claude/skills/konfai-experiments/references/config-authoring.md
  • .claude/skills/konfai-experiments/references/resources-and-clients.md
  • .claude/skills/konfai-experiments/references/tool-reference.md
  • .claude/skills/konfai-experiments/references/troubleshooting.md
  • .claude/skills/konfai-experiments/scripts/check_setup.py
  • .github/workflows/konfai_mcp_ci.yml
  • .gitignore
  • AGENTS.md
  • apps/impact_reg/impact_reg_konfai/__init__.py
  • apps/impact_reg/setup.py
  • apps/impact_seg/impact_seg_konfai/__init__.py
  • apps/impact_seg/setup.py
  • apps/impact_synth/impact_synth_konfai/__init__.py
  • apps/impact_synth/setup.py
  • apps/mrsegmentator/mrsegmentator_konfai/__init__.py
  • apps/mrsegmentator/setup.py
  • apps/totalsegmentator/setup.py
  • apps/totalsegmentator/totalsegmentator_konfai/__init__.py
  • docs/source/concepts/yaml-model-builder.md
  • docs/source/conf.py
  • docs/source/index.rst
  • docs/source/reference/components/models.md
  • docs/source/usage/index.rst
  • docs/source/usage/mcp.md
  • examples/README.md
  • examples/Registration/Config.yml
  • examples/Registration/Evaluation.yml
  • examples/Registration/Prediction.yml
  • examples/Registration/README.md
  • examples/Registration/make_dataset.py
  • examples/Segmentation/Model.py
  • examples/Segmentation/README.md
  • examples/Synthesis/Config.yml
  • examples/Synthesis/Evaluation.yml
  • examples/Synthesis/Model.py
  • examples/Synthesis/README.md
  • examples/Synthesis/UNetpp.yml
  • examples/Synthesis/UnNormalize.py
  • konfai-apps/konfai_apps/__init__.py
  • konfai-apps/konfai_apps/app.py
  • konfai-apps/konfai_apps/app_repository.py
  • konfai-apps/konfai_apps/app_server.py
  • konfai-apps/konfai_apps/bundle.py
  • konfai-apps/konfai_apps/cli.py
  • konfai-apps/setup.py
  • konfai-apps/tests/conftest.py
  • konfai-apps/tests/integration/test_app_server_http.py
  • konfai-apps/tests/integration/test_konfai_app_client_remote.py
  • konfai-apps/tests/integration/test_konfai_apps.py
  • konfai-apps/tests/test_slicer_api_contract.py
  • konfai-apps/tests/test_slicer_cli_json_contract.py
  • konfai-apps/tests/unit/test_app_repository.py
  • konfai-apps/tests/unit/test_app_runtime.py
  • konfai-apps/tests/unit/test_app_server_helpers.py
  • konfai-apps/tests/unit/test_cli.py
  • konfai-apps/tests/unit/test_finetune_lr_override.py
  • konfai-apps/tests/unit/test_input_units.py
  • konfai-mcp/LICENSE
  • konfai-mcp/README.md
  • konfai-mcp/konfai_mcp/__init__.py
  • konfai-mcp/konfai_mcp/apps_catalog.json
  • konfai-mcp/konfai_mcp/capabilities.py
  • konfai-mcp/konfai_mcp/catalog.py
  • konfai-mcp/konfai_mcp/extensions.py
  • konfai-mcp/konfai_mcp/runner.py
  • konfai-mcp/konfai_mcp/server.py
  • konfai-mcp/konfai_mcp/server_apps.py
  • konfai-mcp/konfai_mcp/server_experiments.py
  • konfai-mcp/konfai_mcp/server_jobs.py
  • konfai-mcp/konfai_mcp/server_support.py
  • konfai-mcp/pyproject.toml
  • konfai-mcp/scripts/generate_tool_reference.py
  • konfai-mcp/tests/conftest.py
  • konfai-mcp/tests/mcp_test_helpers.py
  • konfai-mcp/tests/test_mcp_server.py
  • konfai-mcp/tests/test_mcp_server_apps.py
  • konfai-mcp/tests/test_mcp_server_capabilities.py
  • konfai-mcp/tests/test_mcp_server_catalog.py
  • konfai-mcp/tests/test_mcp_server_cli.py
  • konfai-mcp/tests/test_mcp_server_dataset_tools.py
  • konfai-mcp/tests/test_mcp_server_experiments.py
  • konfai-mcp/tests/test_mcp_server_extensions.py
  • konfai-mcp/tests/test_mcp_server_fixes.py
  • konfai-mcp/tests/test_mcp_server_jobs.py
  • konfai-mcp/tests/test_mcp_server_lot4.py
  • konfai-mcp/tests/test_mcp_server_lot5.py
  • konfai-mcp/tests/test_mcp_server_lot6.py
  • konfai-mcp/tests/test_mcp_server_pipeline.py
  • konfai-mcp/tests/test_mcp_server_reliability.py
  • konfai-mcp/tests/test_mcp_server_segmentation_pipeline.py
  • konfai-mcp/tests/test_mcp_server_support.py
  • konfai-mcp/tests/test_mcp_server_tool_index.py
  • konfai-mcp/tests/test_mcp_server_vram.py
  • konfai/__init__.py
  • konfai/data/__init__.py
  • konfai/data/augmentation.py
  • konfai/data/data_manager.py
  • konfai/data/transform.py
  • konfai/evaluator.py
  • konfai/metric/__init__.py
  • konfai/metric/measure.py
  • konfai/models/python/classification/convNeXt.py
  • konfai/models/python/classification/resnet.py
  • konfai/models/python/features/mind.py
  • konfai/models/python/generation/cStyleGan.py
  • konfai/models/python/generation/ddpm.py
  • konfai/models/python/generation/diffusionGan.py
  • konfai/models/python/generation/gan.py
  • konfai/models/python/generation/vae.py
  • konfai/models/python/registration/registration.py
  • konfai/models/python/representation/representation.py
  • konfai/models/python/segmentation/NestedUNet.py
  • konfai/models/python/segmentation/UNet.py
  • konfai/models/python/segmentation/plainconvunet.py
  • konfai/models/python/segmentation/smp.py
  • konfai/models/yaml/AttentionUNet.yml
  • konfai/models/yaml/DynUNet.yml
  • konfai/models/yaml/NestedUNet.yml
  • konfai/models/yaml/PlainConvUNet.yml
  • konfai/models/yaml/ResNet.yml
  • konfai/models/yaml/ResNet18.yml
  • konfai/models/yaml/SegResNet.yml
  • konfai/models/yaml/UNETR.yml
  • konfai/models/yaml/UNet.yml
  • konfai/models/yaml/VGG16.yml
  • konfai/models/yaml/VNet.yml
  • konfai/models/yaml/ViT.yml
  • konfai/models/yaml/__init__.py
  • konfai/network/__init__.py
  • konfai/network/blocks.py
  • konfai/network/network.py
  • konfai/predictor.py
  • konfai/trainer.py
  • konfai/utils/ITK.py
  • konfai/utils/__init__.py
  • konfai/utils/config.py
  • konfai/utils/dataset.py
  • konfai/utils/model_builder.py
  • konfai/utils/pretrained.py
  • konfai/utils/runtime.py
  • konfai/utils/utils.py
  • pyproject.toml
  • tests/assets/Workflows/TinySynth.py
  • tests/integration/test_konfai_core_workflows.py
  • tests/unit/test_augmentation.py
  • tests/unit/test_clip_normalize_block.py
  • tests/unit/test_config.py
  • tests/unit/test_data_manager.py
  • tests/unit/test_dataset_streaming.py
  • tests/unit/test_imports.py
  • tests/unit/test_measure.py
  • tests/unit/test_mind_descriptor.py
  • tests/unit/test_models.py
  • tests/unit/test_network.py
  • tests/unit/test_onnx_export.py
  • tests/unit/test_path_specs.py
  • tests/unit/test_plainconvunet_parametric.py
  • tests/unit/test_predictor_memory.py
  • tests/unit/test_pretrained_bridge.py
  • tests/unit/test_runtime.py
  • tests/unit/test_safe_torch_load.py
  • tests/unit/test_slicer_core_api_contract.py
  • tests/unit/test_smp_and_pretrained_init.py
  • tests/unit/test_trainer.py
  • tests/unit/test_transform.py
  • tests/unit/test_wheel_packaging.py
  • tests/unit/test_yaml_model_attention_unet.py
  • tests/unit/test_yaml_model_catalog.py
  • tests/unit/test_yaml_model_dynunet.py
  • tests/unit/test_yaml_model_equivalence.py
  • tests/unit/test_yaml_model_equivalence_builtins.py
  • tests/unit/test_yaml_model_plainconvunet.py
  • tests/unit/test_yaml_model_resnet18_torchvision.py
  • tests/unit/test_yaml_model_segresnet.py
  • tests/unit/test_yaml_model_unetr.py
  • tests/unit/test_yaml_model_vgg16_torchvision.py
  • tests/unit/test_yaml_model_vit.py
  • tests/unit/test_yaml_model_vnet.py

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:

  • Review on demand using usage pricing
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch review/after-36

Comment @coderabbitai help to get the list of available commands.

@vboussot

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.


You're currently rate limited under our Fair Usage Limits Policy. Your next review will be available in 6 minutes.

@vboussot

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@vboussot vboussot closed this Jul 16, 2026
@vboussot

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@vboussot
vboussot deleted the review/after-36 branch July 16, 2026 11:34
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