[bugfix] fix GLM 5.1 FP8#132
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the DSAIndexer patching logic by moving it from a dynamic patch in patcher.py into a dedicated module under src/mcore_bridge/model/modules/dsa_indexer.py and registering it in register.py. The review feedback highlights a few critical issues: first, inheriting from None when megatron-core is not available will cause a TypeError at import time, which can be fixed by falling back to torch.nn.Module; second, unpacking packed_seq_params directly when it is None will raise a TypeError; and third, accessing nested attributes of dsa_spec during registration should be done defensively to prevent potential AttributeError exceptions.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the DSA Indexer implementation by moving it from a dynamic patch in patcher.py to a dedicated module in dsa_indexer.py and registering it in register.py. The review feedback highlights three important issues: a potential TypeError at import time if McoreDSAIndexer is None, a TypeError when unpacking packed_seq_params if it is None, and a potential AttributeError in register.py due to unsafe nested attribute access on dsa_spec.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
No description provided.