Skip to end of banner
Go to start of banner

Collect Writeups

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

At the end of every Challenge, we aim to collect writeups from all participating users/teams, in which they will provide information about their submission(s). Currently, writeups are collected as Synapse Projects (sample template here), and we ask the participants to include information such as their methodologies, external data sources (if any), and source code and/or Docker images. Typically, writeups are *required* in every Challenge, in order to be considered for “top performer” eligibility and other incentives, including byline authorship.

This article will outline the steps to collect and validate writeups on Synapse, as well as how to display them in a leaderboard combined with the evaluation results.


Workflow Setup

Requirements

  • Synapse account

  • (for local testing) CWL runner of choice, e.g. cwltool

  • Access to cloud compute services, e.g. AWS, GCP, etc.

Outcome

Once set up, the workflow will continuously monitor the writeup queue for new submissions, perform a quick validation, and, if valid, create an archive of the submission. An archive is created to ensure a copy of the writeup is always available to the Organizers team, in case the Participant/Team delete the original version or remove accessibility.

Steps

1. On the live version of the Challenge site, go to the Challenge tab and check whether there is already an Evaluation queue for collecting writeups (skip to Step 3 if so).

Note that by default, Evaluation entities are only accessible to the Evaluation creator; if you are not currently an admin for the Challenge, double-check with other Organizers to ensure that you have the correct permissions to all available queues.

2. Create a new Evaluation queue if one is not currently available. Click on Challenge Tools > Add Evaluation Queue, and name it something like <Challenge Name> Writeup

By default, the newly-created queue will only be accessible to the creator, in this case you. For now, update its Sharing Settings so that:

  • the Organizers team has Can score permissions

  • the Admin team has Adminstrator permissions

  • Anyone on the web has Can view permissions

We recommend not sharing the Evaluation queue with the Participants team until after the workflow has been tested. See Submit Writeup Dry-runs below for more details.

3. Update the quota of the writeup Evaluation queue, such as the Duration (Round Start, Round End) and Submission Limits. Generally, there are no submission limits for writeups, so this field can be left blank.

Get the 7-digit Evaluation ID as it will later be needed in Step 9.

4. Go to Sage-Bionetworks-Challenges organization, and create a New repo.

For Repository template, select “Sage-Bionetworks-Challenges/writeup-workflow”. The Owner can be left as default (“Sage-Bionetworks-Challenges”), and give any name you’d like for Repository name.

Past examples are:

  • Anti-PD1-DREAM-Writeups

  • CTD2-Chemosensitivity-Writeup

  • RA2-Writeup-Infrastructure

Before creating the repo, remember to switch the view from Private to Public.

5. Clone the repo onto your machine. Using a text editor or IDE, make the following updates to workflow.cwl:

Line Number

TODO

Motivation

31

Update "jane.doe" with the Organizers team name.

This will identify the Synapse team that are the organizers for the Challenge.

45

Update "syn123" with the Synapse ID of the Challenge live site.

This will check that the participant/team did not submit the Challenge site as their writeup.

47-50

Uncomment.

Lines 49-50 checks that the writeup Project is AT LEAST accessible to the Organizers team (as defined by Line 31). Lines 47-48 checks the writeup is accessible to anyone on the web.

Push the changes up to GitHub when done.

The next couple of steps are also described in the Creating and Managing a Challenge guide.

6. On the staging site, go to the Files tab and click on the upload icon to Upload or Link to a File:

7. In the pop-up window, switch tabs to Link to URL. For "URL", enter the web address to the zipped download of the workflow infrastructure repository.  You may get this address by going to the repository and clicking on Code > right-clicking Download Zip > Copy Link Address:

Name the file (e.g. "writeup-workflow"), then click Save.

This file will be what links the evaluation queue to the orchestrator. Make note of this File ID for use later in Step 9.

8. Add an annotation to the file called ROOT_TEMPLATE by clicking on the annotations icon:

The “Value” will be the path to the workflow script, written as:

{infrastructure workflow repo}-{branch}/{path/to/workflow.cwl}

For example:

my-writeup-repo-main/workflow.cwl

9. There are two approaches for running the writeup workflow. You can either:

a) tack on the evaluation + workflow onto an existing instance with orchestrator, by adding another key-value pair to EVALUATION_TEMPLATES in the .env file

b) create a new instance (a t3.small would be sufficient enough) and setup orchestrator on that machine. See Steps 7-9, 11 of Creating and Managing a Challenge for more details on how to set this up.

10. (optional but recommended for Displaying Writeups in a Leaderboard) Create a SubmissionView so that you can easily track and monitor the writeup submissions. We recommend the following schema for monitoring writeup submissions:

Column Name

Description

Facet values?

id

Submission ID

createdOn

Date and time of the submission (in Epoch, but rendered as MM/dd/yyyy, hh:mm:ss)

submitterid

User or team who submitted (user or team ID, but rendered as username or team name)

(tick) Recommended

entityid

Link to the writeup

(error) Not recommended

archived

Link to the writeup archive

(error) Not recommended

status

Workflow status of the submission (one of [RECEIVED, EVALUATION_IN_PROGRESS, ACCEPTED, INVALID])

(tick) Recommended

submission_status

Evaluation status of the submission (one of [None, VALIDATED, SCORED, INVALID])

(tick) Recommended

submission_errors

(if any) Validation errors for the predictions file

(error) Not recommended

The highlighted columns would need to be added manually by clicking the + Add Column button at the bottom of the Edit Columns window.

Submit Dry-runs

Use and/or create a new Synapse project and submit it to the writeup queue. (We recommend saving this Project for re-use of future writeup queues setup).

You can directly submit to the queue within the Challenge tab of the live site:

Some cases we recommend testing for are:

Test Case

Workflow Configurations

Expected Outcome

Submitting the Challenge site

INVALID

Submitting a private Synapse project

Lines 49-50 is used (writeup should be accessible to the Organizers team)

INVALID

Submitting a private Synapse project

Lines 47-48 is used (writeup should be publicly accessible)

INVALID

Submitting a Private Synapse project that is shared with the Organizers team

Lines 49-50 is used (writeup should be accessible to the Organizers team)

VALID

Submitting a Private Synapse project that is shared with the Organizers team

Lines 47-48 is used (writeup should be publicly accessible)

INVALID

Submitting a public Synapse project

Lines 47-48 and/or lines 49-50 are used

VALID

Once you are satisfied that the writeup workflow is to your expectations, remember to open the queue to the Challenge participants!

You can do so by updating its Sharing Settings so that the Participants team has Can submit permissions.

Display Writeups in a Leaderboard

Once the Challenge has concluded and top-performers are ready to be announced, the “Final Results” leaderboard will typically be configured to include writeups alongside the final submissions and their scores. This will enable the sharing of solutions and algorithms submitted to the Challenge.

Creating this leaderboard can easily be achieved with a Materialized View table.

Requirements

  • Synapse ID of SubmissionView for final submissions

  • Synapse ID of SubmissionView for writeups

  • challengeutils (for syncing changes)

Steps

1. Go to the staging site and click on the Tables tab. Create a new Materialized View by clicking on Add New… > Add Materialized View.

2. Under “Defining SQL”, enter the following query:

SELECT 
  s.id AS id, 
  s.createdOn AS createdOn, 
  s.submitterid AS submitterid, 
  s.status AS status, 
  (score columns),
  w.entityid AS writeup, 
  w.archived AS archived_writeup 
FROM syn123 s 
  JOIN syn456 w
  ON (s.submitterid = w.submitterid)
WHERE s.status = 'ACCEPTED'
  AND w.status = 'ACCEPTED'

Remember to replace syn123 and syn456 with your Synapse IDs.

This query will join the SubmissionView for submissions (s) with the SubmissionView for writeups (w), using the submitterids from both Views as the index. Rows are filtered to only include valid submissions from both Views (*.status = 'ACCEPTED') – this clause is optional and can be removed if desired.

Columns selected from the submissions View (s) include:

  • submission ID (s.id)

  • submission date (s.createdOn)

  • participant/team (s.submitterid)

  • status (s.status)

  • any annotations related to scores

Columns selected from the writeups View (w) include:

  • Synapse ID of the writeup (w.entityid)

  • Synapse ID of the writeup archive (w.archive)

This query is also assigning aliases, e.g. w.entityid AS writeup for readability and easier querying.

3. Click Save. A table with the selected columns from each SubmissionView will now be available for viewing and querying. It should look something like this:

The above MaterializedView is the result of this query:

SELECT 
  s.id AS id, 
  s.createdOn AS createdOn, 
  s.submitterid AS submitterid, 
  s.status AS status, 
  w.entityid AS writeup, 
  w.archived AS archived_writeup 
FROM syn51034012 s
  JOIN syn29582834 w
  ON (s.submitterid = w.submitterid)

4. Continuing on the staging site, switch to the Wiki tab and go to the “Results” page (create a new Wiki page if it’s not available). Click on the pencil icon to Edit Project Wiki:

5. In the pop-up window, click on + Insert button > Table: Query on a Synapse Table/View:

5. For “Query”, enter something like:

SELECT * FROM syn123

where syn123 is the Synapse ID to the MaterializedView created earlier in Step 3 (not SubmissionViews!). Optionally include aliases and/or clauses to the query if desired, e.g. exclude certain columns such as archived_writeup. Click on the Preview button in the top-left corner to view what the leaderboard would look like.

6. Click Save once you are satisfied with the final leaderboard.

7. Sync changes to the live site with challengeutils' mirror-wiki.

  • No labels