Annotations

Updating submission annotations Deprecate many of these functions once synapseclient==2.1.0

challengeutils.annotations.annotate_submission(syn, submissionid, annotation_dict, status=None, is_private=True, force=False)[source]

Annotate submission with annotation values from a dict

Parameters
  • syn – Synapse object

  • submissionid – Submission id

  • annotation_dict – Annotation dict

  • is_private – Set annotations acl to private (default is True)

  • force – Force change the annotation from private to public and vice versa.

challengeutils.annotations.annotate_submission_with_json(syn, submissionid, annotation_values, **kwargs)[source]

ChallengeWorkflowTemplate tool: Annotates submission with annotation values from a json file and uses exponential backoff to retry when there are concurrent update issues (HTTP 412).

Parameters
  • syn – Synapse object

  • submissionid – Submission id

  • annotation_values – Annotation json file

  • **kwargs

    is_private: Set annotations acl to private (default is True) force: Force change the annotation from

    private to public and vice versa.

    status: A submission status (e.g. RECEIVED, SCORED…)

Returns

synapseclient.SubmissionStatus

challengeutils.annotations.update_submission_status(sub_status: synapseclient.evaluation.SubmissionStatus, values: Union[synapseclient.annotations.Annotations, dict], status: str = None) → synapseclient.evaluation.SubmissionStatus[source]

Updates submission status and annotations

Parameters
  • sub_status – A synapseclient.SubmissionStatus

  • values – A synapseclient.Annotations or dict

  • status – A submission status (e.g. RECEIVED, SCORED…)

Returns

A updated synapseclient.SubmissionStatus