Skip to content

Commit

Permalink
user_id check only on scoring run
Browse files Browse the repository at this point in the history
  • Loading branch information
samwinebrake authored Oct 1, 2024
1 parent 07e015c commit 9bcdfb6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions brainscore_vision/submission/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ def send_email_to_submitter(uid: int, domain: str, pr_number: str,
args, remaining_args = parser.parse_known_args()
args_dict = vars(args)

if 'user_id' not in args_dict or args_dict['user_id'] is None:
user_id = get_user_id(args_dict['author_email'], db_secret=config.get_database_secret())
args_dict['user_id'] = user_id

if args.fn == 'run_scoring':
if 'user_id' not in args_dict or args_dict['user_id'] is None:
user_id = get_user_id(args_dict['author_email'], db_secret=config.get_database_secret())
args_dict['user_id'] = user_id
run_scoring(args_dict)
elif args.fn == 'resolve_models_benchmarks':
resolve_models_benchmarks(domain="vision", args_dict=args_dict)
Expand Down

0 comments on commit 9bcdfb6

Please sign in to comment.