Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion brainscore_core/submission/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from brainscore_core.submission.database import update_score

logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)


class UserManager:
Expand Down Expand Up @@ -246,6 +247,7 @@ def _score_model_on_benchmark(self, model_identifier: str, benchmark_identifier:
public: bool, competition: Union[None, str]):
# TODO: the following is somewhat ugly because we're afterwards loading model and benchmark again
# in the `score` method.
logger.setLevel(logging.INFO)
logger.info(f'Model database entry')
model = self.domain_plugins.load_model(model_identifier)
model_entry = modelentry_from_model(model_identifier=model_identifier, domain=domain,
Expand Down Expand Up @@ -276,7 +278,7 @@ def _score_model_on_benchmark(self, model_identifier: str, benchmark_identifier:
model_identifier=model_identifier, benchmark_identifier=benchmark_identifier)
score_entry.end_timestamp = datetime.now()
# store in database
logger.info(f'Score from running {model_identifier} on {benchmark_identifier}: {score_result}')
print(f'Score from running {model_identifier} on {benchmark_identifier}: {score_result}')
update_score(score_result, score_entry)
except Exception as e:
stacktrace = traceback.format_exc()
Expand Down