Domino offers a solution for capturing and visualizing Job metrics. While it’s recommended to use Domino’s MLflow implementation for this purpose, using Domino directly remains a popular choice. Users have the flexibility to log metrics in both places if they prefer.
-
Click Jobs from the Project menu.
-
Click the funnel icon above the table of Jobs to customize the columns in the Jobs dashboard.
To include metrics in the Jobs dashboard that Domino doesn’t provide by default, you can define custom columns. This can be done by using the dominostats.json
file, letting you tailor the dashboard to better understand and analyze your Job performance.
-
Write a file named
dominostats.json
to the root of your project directory. -
Use keys in
dominostats.json
to identify the outputs you’re interested in and add the corresponding values. -
If Domino detects that
dominostats.json
has been written to the Project root by a Job, it parses the values and shows them as columns on the Jobs dashboard.
Note
|
Domino automatically deletes dominostats.json before each execution.
|
The following is sample R code that writes three key/value pairs to dominostats.json
:
diagnostics = list("R^2" = 0.99, "p-value" = 0.05, "sse" = 10.49)
library(jsonlite)
fileConn<-file("dominostats.json")
writeLines(toJSON(diagnostics), fileConn)
close(fileConn)
The following is the same data written to dominostats.json
in Python:
import json
with open('dominostats.json', 'w') as f:
f.write(json.dumps({"R^2": 0.99, "p-value": 0.05, "sse": 10.49}))
The resulting dominostats.json
from these code examples looks like this:
{
"sse": 10.49,
"R^2": 0.99,
"p-value": 0.05
}
Use the .dominoresults
and .dominoignore
files to control which files Domino renders in the Jobs results view. This can be useful to limit your results if many files are changed in your execution, or to exclude unnecessary log files generated during the execution.
Tip
| R language exceptions can be especially large, which can impact sync times. So you may want to exclude the R debug outputs, depending on your use cases. |
Include or exclude single files in the results dashboard
To include or exclude only specific files, your .dominoresults
or .dominoignore
file must list the relative path to those, each on a new line.
The following example will exclude or include histogram.pdf
and output.txt
in the top-level directory of the Project.
histogram.pdf
output.txt
Use patterns with wildcard characters
Domino can use wildcard patterns in .dominoresults
and .dominoignore
.
This way you can specify groups of files to show.
The following example limits the files to PDF documents in the top-level directory, all PNG files in a directory images and text files arbitrarily deep in sub-directories of the Project.
*.pdf
results/*.png
**/*.txt
Configure Job result views
You can also configure Run results in Central configuration to control things like the maximum number of files Domino renders for comparisons and diffs.
You can see how your custom keys change over time.
-
Click Jobs Timeline to expand a line chart of
dominostats.json
values over time.This chart shows all Jobs listed in the current dashboard. To filter to a specific set of related Jobs, tag the Jobs to create a separate dashboard view.
The x-axis ticks on the timeline represent individual Jobs, and the y-axis represents the values for the statistics in those Jobs.
-
Hold your cursor over the chart to see individual data points as tooltips.
-
Click on a point to open the details for the Job that produced that value.
-
Click and drag on the chart to zoom in.
-
Click each stat in the legend to toggle its line on and off.
By default, Domino notifies you by email about failed Project executions. You and your Project collaborators can also receive notifications about successful executions.
On successful executions, you will receive an email with the last few lines of stdout
, and up to ten results files from your execution.
Domino detects which files were added or changed during your execution, and captures those as the execution’s results.
You can create fully customizable Job email notifications with any formatting and results you want.
For Domino File System (DFS) projects, create a file named email.html
in the root of your project folder as part of your run.
For Git-based projects, create a file named email.html
in the /mnt/artifacts/
directory as part of your run.
The HTML in email.html
can be used as the body and subject of the email sent on success.
Tips and tricks
-
To include images, reference the path to the image from the root of the folder. The image can be anywhere in your Project. For example, to include an image in
plots/plot1.png
, write<img src="plots/plot1.png">
. -
Put all CSS styles in inline
style
attributes. Most email clients ignore<style>
blocks in HTML emails. -
You can render a Jupyter Notebook to HTML and name it
emails.html
to send notebooks. -
Use tables for complex layouts. Most email clients ignore CSS positioning.
-
Include the
<head>
and<title>
tags at the start of the HTML file to customize the subject. For example:<head><title>Custom Subject</title></head>
creates an email with the subject "[Domino] Custom Subject". -
To explicitly define the files that are sent with your success email, create a file named
.dominoresults
and write a filename per line in the.dominoresults
file.CautionIf you create a .dominoresults
file, you must listemail.html
in this file to ensure that your custom email is used. If you don’t, the default results email will be generated. -
For Git-based projects, write Job results to the
/mnt/artifacts/results/
directory. This allows the files to be included as attachments to the email and appear as results in the Job UI. See Save Artifacts to the Domino File System for more info.
# generate and save plot
png("pressure.png")
plot(pressure)
dev.off()
# generate HTML in a string
html_string <- paste0("
<head>
<title>",Sys.Date()," - Pressure report","</title>
</head>
<body>
<h2>Exponential pressure growth! </h2>
<h3>",Sys.time(),"</h3>
<img src='pressure.png' />
<p>Caption goes here</p>
</body>
")
# write string to file
write(html_string, "email.html")