Hi CryoSPARC Team, Is there any way with the help of script or CryoSPARC cli, we can do the T20 job submission and verify cryoSPARC is working fine.
Hi @pvalappil, please see https://guide.cryosparc.com/processing-data/tutorials-and-case-studies/tutorial-verify-cryosparc-installation-with-the-extensive-workflow-sysadmin-guide
@spunjani Thanks for the reply, I normally run this job manually to verify the CryoSPARC installation. I am looking for an un attended (automatic) way of submitting all theses jobs with scripts not via CryoSPARC Web UI. Do you have any API or any CryoSPARC cli to do so?
@stephan Did any time any one come across with the above mentioned requirement? Could you please help me here. Thanks
Hi @pvalappil, you can automatically create and run an extensive workflow from the cryosparcm icli
by entering the following Python commands:
email = "admin@example.com"
puid = "P32"
lane = "default"
uid = cli.get_id_by_email(email)
wuid = cli.create_empty_workspace(project_uid=puid, created_by_user_id=uid, title='T20S Extensive Workflow Run')
juid = cli.create_new_job(job_type="extensive_workflow_bench", project_uid=puid, workspace_uid=wuid, created_by_user_id=uid)
# cli.job_set_param(puid, juid, "all_job_types", True) # Optional
cli.enqueue_job(project_uid=puid, job_uid=juid, lane=lane)
Replace quoted values in the first three lines with an email address for a user on the system, the ID of the project that hosts each workflow run and a lane onto which all jobs should be queued.
This script creates a new workspace in the given project, creates the Extensive Workflow job within that workspace, optionally enables all job types (remove the #
from the second-last line to enable) and starts the workflow.
If it’s more convenient, here’s the exact script in for use in a shell like bash:
cs_email="admin@example.com"
cs_puid="P32"
cs_lane="default"
cs_uid=$(cryosparcm cli "get_id_by_email('${cs_email}')")
cs_wuid=$(cryosparcm cli "create_empty_workspace(project_uid='${cs_puid}', created_by_user_id='${cs_puid}', title='T20S Extensive Workflow Run')")
cs_juid=$(cryosparcm cli "create_new_job(job_type='extensive_workflow_bench', project_uid='${cs_puid}', workspace_uid='${cs_wuid}', created_by_user_id='${cs_uid}')")
# cryosparcm cli "job_set_param('${cs_puid}', '${cs_juid}', 'all_job_types', True)" # Optional
cryosparcm cli "enqueue_job(project_uid='${cs_puid}', job_uid='${cs_juid}', lane='${cs_lane}')"
Hi @nfrasser,Job automation worked, now would like to pull the job details.
As an example the job status as, whether the job ran successfully or not, job id and the job performance metrics.
Thanks.
@pvalappil the best CLI function to use is get_job
, e.g.,
cli.get_job('P1', 'J2', 'status', 'bench')
We don’t yet have job performance metrics for the extensive workflow job but we do have metrics for the individual jobs it spawns. Check out the CLI reference for all available calls you can make: https://guide.cryosparc.com/setup-configuration-and-management/management-and-monitoring/cli