By default, Code Ocean runs headlessly, that is, without a pop-up display or user input during runtime. Now, however, we also support interactive sessions, where you can run code line-by-line, chunk-by-chunk, or via a point-and-click interface.
First, if you are not viewing the new Code Ocean, click the 'Preview the new Code Ocean ' icon in the top right of a capsule.
Here, you will see a 'Run' button, and also a new 'interactive session' dropdown menu:
Currently, Interactive sessions come in five varieties:
Click one of the above five icons to start an interactive session. (Note: some installation may be necessary -- see the above articles for the particulars of each.)
When you've done so, a new session will be launched, and labeled 'Interactive session.'
When these words turn blue, this is now a link that you can click to launch your session.
Five general caveats about interactive sessions on Code Ocean:
- Leaving an interactive session running will continuously use quota until you stop the run by clicking the red square in the screenshot above.
- Every 30 minutes, your interactive session will ask you if you are still there. This is to prevent an idly open tab from exhausting your quota.
- When you open an interactive session, you may be prompted to accept notifications from Code Ocean. If you accept, you will receive this half-hourly reminder in your open interactive tab. If you do not accept, it will pop up in the Code Ocean capsule from which you launched the interactive session.
- If you do not actively tell Code Ocean that you are still working, every 30 minutes, your session will end and your work will be lost. Please pay attention to these notifications.
- Work done in an interactive session will not be saved to your
/datapanes. For the time being, please copy and re-implement any changes you wish to save back to your code and data.