Running Jobs
Wisp CLI is shipped with a minimal job runner to get you started running jobs, even if your organization does not have a full job submission pipeline set up.
The runner allows you to
- Submit compute jobs
- Detach and reattach to them after submission
- Track progress and stream logs
- Autostop resources after job completion or failure.
For more advanced features, we are working on Ray & Kubernetes integrations. If you want to learn more about that, reach out to us!
Submitting a job
When you add setup
, run
or teardown
steps to your wisp-spec.yml
file, Wisp
automatically identifies these as a "job". When executing wisp run
from the directory
of the specification file, these scripts will be remotely executed on the remote server.
Under the hood, Wisp uses screen
. You can ssh into the server, and interact with the
Wisp screen session as you would do with a normal screen session.
Exiting the job command with CTRL + C
in the terminal, will simply detach from the job
session. The job will keep running in the background until completion.
Example: Submitting a Job
Update your wisp-spec,yml
file with the following parameters:
### ...
run:
script:
- for i in {1..10}; do echo $i && sleep 1; done
### ...
This will submit a job that counts to 10 and exits.
$ wisp run
Job submitted with id: 20250404-154119-AWS-1
>> $ for i in {1..2}; do echo && sleep 1; done
>> 1
>> 2
>> 3
>> 4
>> 5
>> 6
>> 7
>> 8
>> 9
>> 10
Job completed successfully
Every execution of wisp run
will re-run the scripts and configuration in the
wisp-spec.yml
file. Additionally, a new job will be registered with a status and log
streams in the dashboard. The jobs can be found in the dashboard under Projects -> My
Project. You can see the logs, as well as more data on the job, under the job id link
in the table there.
Example: Detaching and attaching to a job
Wisp allows you to easily detach and attach to jobs. Following the example above, run
the job, and as it starts counting, click CTRL + C
to exit the command.
Take note of the job id by doing one of the following:
- Read it from the terminal output after submission
- Run
wisp job list
and take the most recent entry - Go to Projects -> My Project in the dashboard and take the running job's ID.
Now execute wisp job attach <JOB_ID>
. This will resume the screen session, or if the
job has completed, print the job output and exit.