Fix missing-modality aggregation widths#1
Open
AbdelStark wants to merge 1 commit intofacebookresearch:mainfrom
Open
Fix missing-modality aggregation widths#1AbdelStark wants to merge 1 commit intofacebookresearch:mainfrom
AbdelStark wants to merge 1 commit intofacebookresearch:mainfrom
Conversation
armaanparikh
added a commit
to armaanparikh/tribev2
that referenced
this pull request
Apr 20, 2026
Previously each job spent ~11 commits (upload-url meta, launch meta, 6 progress patches in Python, 4 per-file uploads). Burned the 128/hour budget after ~12 jobs. New flow: 2 commits per job. - /api/upload-url: no commit (just returns repo/path/token). - Browser upload to HF: commit facebookresearch#1 - /api/jobs: writes meta.json once with hfJobId: commit facebookresearch#2 (server-side) - /api/jobs/[id]: read-only; derives status from file existence + HF inspect. Never commits. - tribe_predict.py: uses upload_folder to batch preds.npy, overlays, and preds_meta.json into a single commit. Drops _patch_meta progress updates (HF inspect stage is enough for UI messaging). Made-with: Cursor
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.
Summary
This fixes the missing-modality fallback path in
FmriEncoderModel.Before this patch, absent modalities were always zero-filled with width
hidden / n_modalities, which is only correct forextractor_aggregation="cat". Forsumandstack, projectors emit fullhiddenwidth, so modality ablations or partially missing feature sets could produce shape mismatches or incorrect aggregation.Changes
cat,sum, andstackfeature_dims[modality] is NonepathValidation
.venv-tests/bin/python -m pytest -q tests/test_model_missing_modalities.py7 passedThis keeps the existing
catbehavior unchanged while making the other supported aggregation modes shape-safe.