Code Ocean User Guide
v2.13.0
Search
K

Running a Capsule with Reproducible Run

Once you build the environment and upload/create the script to run, you can execute a reproducible run with the capsule IDE. Please go to Getting Started if you are new to Code Ocean and need a product walkthrough or our environment guide if you need help setting up.

Run File

The run file is a bash script that is often referred to as the driver script. The driver script generates all desired results in an automated way without any human intervention. This way, the results are less prone to variations from human input. When executing a Reproducible Run, the run file will be executed end to end.

Setting up Run File

  • Hover over a file;
  • Click the dropdown menu that appears on it;
  • Select Set as File to Run:
You'll then get a 'run' script, as shown above, that executes your main script. As mentioned, this file is a shell script and can be modified as you see fit to run your analyses.

What makes a good main script?

First, your run script should run headlessly, meaning that it does not require user input, nor expect a pop-up display, during runtime.
Second, you should presume that user will not be monitoring their runs continuously, Therefore, please:
  • have logical default parameters;
  • reproduce as many of your results as possible without users' needing to choose anything;
  • run continuously without pause or delay.

Executing a Reproducible Run

The Reproducible Run button is located at the top of the timeline panel which is on the right of the UI.
Once you click on it, the system will prepare the machine to run your computation. The file will be temporarily locked and show the computation progress information on the Reproducibility panel.
You can stop the run by clicking on the Stop Run button. When the run is complete you are returned to the Timeline where the results of the run, whether successful or not are displayed.
To view the run details from the Reproducibility pane, click the dropdown list arrow, from the menu click and click View Run Details.

Concurrent Runs

On top of the computation progress information, you can click on Back to Timeline, and execute another run concurrently.
In the screenshot below, there are two computations running at the same time. You can click on View Run Details to go back to the computation progress information for tracking the progress.
Dedicated machine is supported with concurrent runs as well.

Concurrent Reproducible Run Overrides Run Output

The run output can be switched between concurrent runs in the console by clicking View Output.

Stop Computation during Post Run Step

A computation can be stopped during a post run step, for example results collection during a Reproducible Run or syncing back to the capsule after a Cloud Workstation session.
If a user wants to return to their capsule quickly to continue working, the stop computation functionality can reduce the time spent waiting for potentially unnecessary steps to complete (e.g. collecting results that aren’t needed).
A warning is issued before performing the action. For Reproducible Run, the warning is that the results will be lost. For Cloud Workstation, any changes made to the capsule and environment will be lost.