feat(training): expose map_fusion_mode as a train_il parameter - #192
Merged
riita10069 merged 1 commit intoAug 12, 2026
Merged
Conversation
The model has selected map-BEV fusion by registry key since autowarefoundation#94 (MAP_FUSION_REGISTRY: residual / cross_attn / deformable) and AutoE2E.__init__ accepts map_fusion_mode, but train_il never forwarded it. Every run therefore trained the constructor default, residual, whatever the experimenter intended — and nothing in the run log said so. That makes the 'Map Feature Fusion: Residual, Attention' axis of autowarefoundation#168 unreachable through the sanctioned training path: a contributor comparing the two either compared residual against residual, or left train_il for a custom script and lost comparability with everyone else. Adds a MapFusion enum beside the existing Backbone enum, threads it through train_il and wf_train_il, and records it in the checkpoint config so evaluation rebuilds the same architecture — _model_kwargs feeds that dict into AutoE2E(**config), so without the key a non-default run would be reconstructed with the constructor default and load mismatched weights. Also logs model/map_fusion_mode to MLflow so runs are distinguishable after the fact. The default reproduces the previous behaviour exactly, so runs that do not pass the argument are unchanged. Tests cover the pass-through, the workflow wiring, the checkpoint round-trip and that every enum value is a registry key; they fail without the change.
Collaborator
|
Thanks for the fix, this was a clear bug. Great. |
riita10069
approved these changes
Aug 12, 2026
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.
Problem
AutoE2E.__init__has acceptedmap_fusion_modesince #94, andMAP_FUSION_REGISTRYoffersresidual/cross_attn/deformable. Buttrain_ilnever forwarded it, so every run trained the constructor default —residual— regardless of intent, and nothing in the run log said so.That makes the "Map Feature Fusion: Residual, Attention" axis of #168
unreachable through the sanctioned path. A contributor comparing the two either
compared residual against residual, or left
train_ilfor a custom script andlost comparability with everyone else. It is a silent failure: the run looks
healthy and produces a plausible number.
What this adds
MapFusionenum beside the existingBackboneenummap_fusion_modeontrain_ilandwf_train_ilcheckpoint_config, so evaluation rebuilds the samearchitecture —
_model_kwargsfeeds that dict intoAutoE2E(**config), sowithout the key a non-default run is reconstructed with the constructor default
and loads mismatched weights
model/map_fusion_modeto MLflow, so runs are distinguishable after the factThe default reproduces the previous behaviour exactly. A run that does not pass
the argument is unchanged.
Deliberately not included
planner_modeis left to #172, which already adds it totrain_ilalongwith the
compute_planner_losswiring. Only the map-fusion half is unique tothis PR, so it stays narrow rather than fixing planner_mode as well.
BEV grid size is left to #188 (
camera_bev_size), which touches the sametrain_ilsignature block. This PR adds one parameter next tobackboneandshould rebase cleanly either way; happy to rebase behind whichever lands first.
Tests
Model/tests/test_map_fusion_selection.py— a new file rather than an additionto
test_workflow_training_lifecycle.py, which both #172 and #188 modify. Could also integrate intotest_workflow_training_lifecycle.pyif prefered.Covers: the pass-through into
AutoE2E, the workflow wiring, the checkpointround-trip through
_model_kwargs, and that every enum value is a registry key.Verified to fail without the change (5 of 8 fail).
cross_attnis a trap at the contract resolutionWorth knowing before anyone selects it:
MapCrossAttentionFusion.forwardraisesabove 4096 BEV tokens, and the KITScenes contract grid is 256×256 = 65,536. So
deformableis the attention-based option at that resolution. The enum exposescross_attnanyway because it is valid at smaller grids, and the guard failsloudly rather than silently.