transformers
f196737b - chore(linter): add TRF018 modeling rule (#46259)

Commit
8 days ago
chore(linter): add TRF018 modeling rule (#46259) * Add TRF018 modeling rule * Fix TRF018 init weights batch 1 * Fix TRF018 init weights batch 2 * Fix TRF018 init weights batch 3 * fix style * ignore rule 18 on certain classes * fix sam3 * more cleanups * revert mlinter change * new pass * revert rule change * remove change * simplify some branches with super * p1 * part2 * remove ignores where not needed * i have no idea why but let's keep it ig * fix * ignore version-based kernel issue * make fmt * Fix regnet The parent PreTrainedModel._init_weights draws random numbers for every module before regnet's own Conv2d/Linear override runs — and for Conv/Linear that parent result is immediately overwritten, so the only effect is shifting the global RNG stream. The test checks that the original classifier's 3-element bias (init'd with uniform_, which ignores config_no_init) has mean <= 0.1 — a high-variance, RNG-dependent check. The shift pushed regnet's draw to mean 0.129 → fail. It's not a behavioral regression, just RNG luck flipping. --------- Co-authored-by: vasqu <antonprogamer@gmail.com>
Author
Parents
Loading