Skip to content

Commit

Permalink
case invalidation minor fix (only affects models_without_norm)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0b77085)
  • Loading branch information
plutonium-239 committed Aug 22, 2024
1 parent 669c250 commit 45146a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion experiments/util/estimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ def skip_case_check(args: argparse.Namespace) -> bool:
invalid = False
if args.case is None:
return invalid
is_surgical = 'surgical_last' in args.case or 'surgical_first' in args.case
# 1.
for c in ["grad_norm_bias", "grad_norm_weights"]:
if c in args.case and args.model in models.models_without_norm:
invalid = True
for c in ["no_grad_norm_bias", "no_grad_norm_weights"]:
if c not in args.case and args.model in models.models_without_norm:
if c not in args.case and args.model in models.models_without_norm and not is_surgical:
invalid = True
if invalid:
if args.print:
Expand Down

0 comments on commit 45146a3

Please sign in to comment.