Skip to content

Refactor MapDiff into a complete reusable pipeline - #25

Merged
wenruifan merged 1 commit into
mainfrom
simplify-mapdiff-example
Aug 4, 2026
Merged

wenruifan merged 1 commit into
mainfrom
simplify-mapdiff-example

Conversation

@wenruifan

Copy link
Copy Markdown
Collaborator

Summary

  • replace the lightweight and duplicated MapDiff example implementation with the complete release-compatible model and diffusion pipeline
  • keep data preparation responsible for residue graph and geometry construction while making the collator batch-only
  • expose the named mapping workflow used throughout KaleProtein: loader -> preprocessor -> model.embed(**inputs) -> model.generate/predict(**embeddings)
  • move reusable sparse EGNN, invariant point attention, and backbone geometry components into kaleprotein
  • consolidate IPA pretraining and diffusion training into one real train.py workflow
  • update generation, evaluation, documentation, package extras, and smoke coverage

Why

The previous example mixed preprocessing with collation, carried toy and upstream-compatibility copies, and did not faithfully represent the published MapDiff architecture or checkpoint. This made the example harder to understand, reuse, and validate through the Auto APIs.

User impact

The MapDiff example now provides a clean but complete inverse-folding pipeline without importing the original repository. Official CATH processed graph features are preserved, including five-atom coordinates and the real C-beta position. The official v1.0.1 checkpoint is loaded strictly against a checked release-state manifest instead of silently falling back to a partial model.

Validation

  • pytest -q: 85 passed
  • focused MapDiff and preprocessor tests: 9 passed
  • strict load of all 464 tensors from the official MapDiff v1.0.1 checkpoint
  • end-to-end generation with the official checkpoint
  • Python compile check and git diff --check
  • clean wheel build and isolated installation smoke test

@wenruifan
wenruifan marked this pull request as ready for review August 4, 2026 10:33
@wenruifan
wenruifan merged commit 1528930 into main Aug 4, 2026
6 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