Skip to content
Merged
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
15 changes: 9 additions & 6 deletions stade/core/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
from django.template.loader import render_to_string
from girder_utils.files import field_file_to_local_path
from girder_utils.storages import expiring_url
from isic_challenge_scoring import (
ClassificationMetric,
ClassificationScore,
ScoreError,
SegmentationScore,
)

from stade.core.models import Approach, Submission, Task, TeamInvitation

Expand Down Expand Up @@ -141,6 +135,15 @@ def generate_submission_bundle(task_id, notify_user_id):


def _score_submission(submission):
# isic_challenge_scoring pulls in numpy, pandas, scipy and scikit-learn, which is far more
# memory than the web processes (which import this module for the task signatures) need.
from isic_challenge_scoring import (
ClassificationMetric,
ClassificationScore,
ScoreError,
SegmentationScore,
)

try:
truth_file: FieldFile = submission.approach.task.test_ground_truth_file
prediction_file: FieldFile = submission.test_prediction_file
Expand Down
Loading