Refactor processing and modality retrieval#2
Merged
MichelDucartier merged 15 commits intomasterfrom Oct 1, 2025
Merged
Conversation
Co-authored-by: MichelDucartier <m.zhang2490@gmail.com>
Co-authored-by: Michael Zhang <MichelDucartier@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the processing and modality retrieval system by introducing a new modular architecture for handling different modality types. The refactoring moves from the old modality_imp system to a new modalities module with base classes and auto-registration functionality.
Key changes include:
- Introduction of new base classes (
BaseModality,BaseModalityConfig,BaseModalityProcessor) for consistent modality handling - Implementation of an
AutoModalityregistry system for dynamic modality registration and instantiation - Addition of a new
dataset/loadersystem to replace the old registry pattern - Creation of an MLP projector module for standardized projection layers
Reviewed Changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/multimeditron/utils/init.py | Adds new imports and global cache functionality with warning system |
| src/multimeditron/train/trainer.py | Removes unnecessary blank lines and uncomments code |
| src/multimeditron/model/prompt_tokenizers.py | Removes unused import and cleans up whitespace |
| src/multimeditron/model/projectors/mlp.py | New MLP projector module with comprehensive documentation |
| src/multimeditron/model/model.py | Major refactoring to use new modality system with AutoModality |
| src/multimeditron/model/modalities/ | New modality system with base classes and image modality implementations |
| src/multimeditron/model/data_loader.py | Updates to use new modality system and adds comprehensive documentation |
| src/multimeditron/dataset/ | New loader system replacing old registry pattern |
| config/config_alignment.yaml | Configuration updates to support new loader system |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…editron into processor-rework
MichelDucartier
approved these changes
Oct 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.