Learn about the many flexible ways that you can launch Domino Jobs depending on your needs. Domino Jobs provide a structured approach to run code files organizing the necessary hardware, compute environment, data resources, and security protocols to create a highly reproducible execution environment.
You can start a Job interactively from multiple locations in the Domino UI.
Jobs dashboard
To run a Job from the Job dashboard:
-
From the navigation pane, click Jobs. The Jobs dashboard shows all Jobs for your Project, sorted into tabs by Job status.
NoteYou can also use the Quick Action menu to create a Job. To do this, click the + next to Jobs in the navigation pane. -
Click Run to start a new Job.
-
In the Start Run window, configure the Job.
-
Enter the File Name of the script you want Domino to execute, followed by any arguments for the script.
-
Select the Hardware Tier to use for this Job.
In a Domino Nexus deployment, hardware tiers in the dropdown are grouped by data plane, such as
GCP europe-central2
below. TheLocal
data plane corresponds to running the execution in the Domino control plane cluster. -
Choose the Compute Environment for the Job and its specific version. By default, the Job will use the latest version of your environment.
TipDomino recommends that you use the revision that was set as active by the Project owner. If you select another revision, you can see a Not Recommended warning. NoteRestricted Projects may limit your choice of environments. -
If your administrator has enabled volume provisioning recommendations, you can select a volume size automatically recommended by Domino, instead of the default volume size.
NoteIn a Git-based Project, the first Job you launch always uses the volume size configured in your Project settings. Subsequent Job launches receive volume provisioning recommendations. -
If necessary, attach a compute cluster to your execution. To learn more about clusters, see the following:
-
Domino shows you what data will be mounted in your execution based on the selected data plane.
-
In the example above, this execution runs in the
AWS us-west-2
data plane. -
We can see that the Project’s dataset will not be available because it is only available in the
Local
data plane. -
We can also see that the
fsx-for-lustre
EDV will be mounted because it has been added to this Project and is available for the selected remote data plane.
TipIf you want to use a data mount that is not available, note which data planes it is available in, then return to the first step in the modal to select a hardware tier in the corresponding data plane. -
-
You can also configure your Job to create new Dataset Snapshots to mount upon execution completion. Created snapshots are shown under the details tab for a Job.
Note
|
This feature requires |
Project files page
You can start a Job directly from the Project Code page.
-
Go to your Project > Code > Find the file you want to run.
-
Click the gear icon > Run.
-
Go to the file you want to run and click the gear icon at the end of the row in the files list, then click Run.
-
Use the window to configure the Run. This window has additional options to set up recurring scheduled Jobs and select different hardware tiers.
- Title
-
In this field, enter a name for the Job. This name will be the label for the Job in the Jobs dashboard.
- Parameters
-
If there are any arguments or parameters you’d like to pass to your script, enter them here.
- Hardware tier
-
This dropdown list lets you set the hardware tier used by the Job.
- Schedule to repeat
-
In this section, specify if you want the run to execute only once, or to repeat on a schedule.
- Publish after complete
-
Check this if you want Domino to republish a Model API once the Job completes successfully.
Launcher UI
A Launcher is a web form that rests on top of a script that Domino can execute in a Job. You can use a Launcher to pass arguments to your script from UI fields in a customized web form.
From your workstation, you can start Jobs through the Domino CLI. You must first install the Domino CLI on your system.
After you have logged in and opened a Project, you can start Jobs with:
`domino run <filename>`
Examples:
`domino run calculateStats.r`
`domino run runModel.m model1 .05`
`domino run --wait runModel.m model1 .05`
`domino run --direct "pip freeze | grep pandas"`
Domino Python SDK
You can use the Domino Python SDK to start and monitor Jobs in Domino either from a tool like a Jupyter Notebook or VS Code or from within another Domino Job to chain together multiple Jobs in a more complex workflow.
-
Write code to connect to Domino and start a Run using the following example:
import os
from domino import Domino
domino = Domino(
"marks/quick-start",
api_key = os.environ["DOMINO_USER_API_KEY"],
host = os.environ["DOMINO_API_HOST"],
)
# Blocking: this will start the run and wait for the run to finish before returning the status of the run
domino_run = domino.runs_start_blocking(
["main.py", "a", "b", "9"], title = "Started from Python API example code"
)
print(domino_run)
# Non-blocking: this will start the run and print the Run ID and check the status of the run *once*
# domino_run = domino.runs_start(["main.py", "a", "b", "9"],
# title = "Started from Python API example code")
# print(domino_run)
# run_status = domino.runs_status(domino_run.get("runId"))
# print(run_status)
Note
| When using the Python SDK from within a Domino Workspace or Job, the environment variables needed for authentication are automatically configured. If you would like to set up your workstation outside Domino, learn more about how to programmatically access Domino |
You can use the Domino API to start a Job with a POST request to:
For more information about how to send valid configuration data, see the API docs.
Python and R Domino API bindings
The Domino API is also available in language-specific wrappers.
Use the dominodatalab Python library and domino R package to call the Domino API in your preferred language.
Use Domino to schedule Jobs in advance, and set them to execute on a regular schedule. These can be useful when you have a data source that is updated regularly.
Jobs Data science is an experimental science - it is common for a Project to require many Jobs before you’ve achieved your goals. Domino allows you to tag and rename Jobs to help you and your team track and manage Project work history effectively.
Tag Jobs
Tagged Jobs facilitate better search and discoverability in the Jobs dashboard.
It’s best practice to start tagging Jobs from the start of a Project. For your tagging strategy, think about groups of Jobs you and collaborators would like to view in the Jobs dashboard.
For example, tagging your LLM pre-training Jobs differently than the instruction fine-tuning Jobs might provide for better search and visualization.
-
From the navigation pane, click Jobs.
-
Select the Jobs you want to tag, then click the Tag icon.
Re-run a Job
To re-run a job:
-
From the Jobs page, select the Run that you want.
-
Select either Re-Run with Original Version or Re-run with the Latest version
Re-run with Original Version runs the Job with the same input arguments and Project files as the original run.
Re-run with Latest Version runs the Job with the same input arguments used previously, while using the latest versions of your files.
Note
| When you work with a Git-based Project, Domino pulls the latest files from the configured branch. If the Git repository is associated with a specific commit, then Domino pulls from that commit. |
Note
| In restricted Projects, Job re-runs use the current restricted revision of the environment. This revision may be different from the revision that was used to run the Job previously. |
Learn how to schedule Jobs and view Job results.