You can easily compare key metrics from multiple executions through the web application or using the REST API.
Web app
- Open a project
- Select multiple executions using the checkbox in the Executions table
- Click Compare to open the metadata view with selected executions
- Click Table to output a table with all the values from each execution
- Click Latest to show only the latest value in the table
- Click on the best performing line to open the execution that generated these results
REST API
There are 2 endpoints available for fetching metadata:
Download metadata of a single execution
https://app.valohai.com/api/v0/executions/{id}/metadata/
For example:
import requests
import json
import os
# Get the Base URL of your Valohai environment
VH_BASE_URL = os.getenv('VH_BASE_URL', 'https://app.valohai.com')
# Get the Valohai API token you created earlier.
# Here it has been stored in a local environment variable.
# Remember to follow your organization's security standards when handling the token.
VH_API_TOKEN = os.getenv('VH_API_TOKEN')
headers = {'Authorization': 'Token %s' % VH_API_TOKEN}
# Place your execution ID here
execution_id = '01847a7f-71c5-3f9c-5805-0d9247aab6fe'
# Send a request (with the authentication headers) to fetch all executions in a project
# You can get the project ID for example
resp = requests.get(f"{VH_BASE_URL}/api/v0/executions/{execution_id}/metadata/", headers=headers)
resp.raise_for_status()
# Save the response to a file
with open("execution-metadata.json", "w") as outfile:
json.dump(resp.json(), outfile)
Get a CSV file with metadata from multiple executions
https://app.valohai.com/api/v0/executions/multi_download_metadata_csv/