From 9bcdfb66b1699d57ab143f55621d81830d543719 Mon Sep 17 00:00:00 2001 From: Sam Winebrake <85908068+samwinebrake@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:59:01 -0400 Subject: [PATCH] user_id check only on scoring run --- brainscore_vision/submission/endpoints.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/brainscore_vision/submission/endpoints.py b/brainscore_vision/submission/endpoints.py index 698bc09c2..df84fb323 100644 --- a/brainscore_vision/submission/endpoints.py +++ b/brainscore_vision/submission/endpoints.py @@ -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)