What’s the correct approach to marking a live session as complete
from the cli? trying to automate lifetime of sessions and cleaning up session data as correctly as possible. I couldn’t find a function for doing so in the limited poking around of the cli object, maybe cli.update_session()?
Hey @yoshiokc,
This is currently not documented anywhere, but you can run:
cryosparcm rtpcli "mark_session_completed(project_uid, session_uid)"
or in cryosparcm icli
:
rtp.mark_session_completed(project_uid, session_uid)
NOICE! thanks, out of curiosity, what exactly does being marked for completion do? It takes long enough in the GUI that I assume some FS operations are being done on the backend rather than just DB updates. Thanks again!
never mind, answered my own question by checking the code for the function call, thanks!
For posterity, marking a session as “completed” via the UI or through the above CLI function will:
- Pause the session if it’s not already paused
- Set the session’s
status
tocompleted
- Compute session statistics (total exposures, total failed, etc.)
- Update the size of each data type in the session (e.g.,
micrographs
,particles
,thumbnails
, etc.,) for the data management tab - Export the database documents of the session to disk (all images, log messages, etc.,)
For more information about managing a CryoSPARC Live session via the CLI, please see: