Repository navigation
SWF(bug): return config error for bad gemma4 attention_pattern - #85
Merged
maplepaladin73 merged 1 commit intoNov 23, 2026
Merged
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
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
Malformed Gemma-4
text_config.attention_patternentries now return a config error throughparse_configinstead of panicking.Root cause:
parse_gemma4_paramsusedpanic!for an unknown attention-pattern string. That path is reachable from normal config loading, so one bad checkpoint value could abort the process rather than fail config parsing.Test plan
Try it (CPU):
ATLAS_SKIP_BUILD=1 CUDARC_CUDA_VERSION=13000 cargo test -p atlas-core --lib gemma4 -- --nocapturegemma4_rejects_unknown_attention_pattern_entrypanicked throughparse_configatcrates/atlas-core/src/config/parsers/gemma4.rs:75withUnknown Gemma-4 attention_pattern entry: 'not_an_attention_kind'.gemma4tests →3 passed; fullcargo test -p atlas-core --lib→260 passed; 0 failed.cargo fmt --all -- --checkATLAS_SKIP_BUILD=1 CUDARC_CUDA_VERSION=13000 cargo clippy --workspace --testsbash scripts/check-license-headers.sh,typosparse_configpath.Notes for reviewers
The fix only replaces the confirmed panic path with an
anyhowerror; valid Gemma-4 attention patterns are unchanged. I kept the existing non-string fallback (unwrap_or("full_attention")) because local history shows it was present when the parser landed and there is no evidence it is a bug.CLA
Implemented in session Return config error for bad gemma4 attention_pattern
Review with Devin · Open in Devin Desktop