This library is part of the yProv suite, and provides a unified interface for logging and tracking provenance information in machine learning experiments, both on distributed as well as large scale experiments.
It allows users to create provenance graphs from the logged information, and save all metrics and parameters to json format.
The image shown above has been generated through one of the yProv4ML use cases. Several examples are present in the examples section and provided in the example directory on GitHub .
An experiment is a collection of runs where each run is a single execution of a python script.
By changing the experiment_name parameter in the start_run function, the user can create a new experiment.
All artifacts and metrics logged during the execution of the experiment will be saved in the directory specified by the experiment ID. Additionally, a global rank (GR) parameter is tracked, to enable the library to save data in multi-process environments.
Several runs can be executed in the same experiment. All runs will be saved in the same directory (according to the specific experiment name and ID).
The creation of dot files and svg images for the library is handled through the GraphViz suite. For everything to correctly work, this module has to be installed.
We reference both the installation section on their docs , as well as the main ways to install it.
sudo apt install graphviz
# Installing Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install graphviz
Installers are at the Download page of GraphViz .
Install from pip:
pip install 'yprov4ml==4.0'
# Or for the legacy version
pip install 'yprov4ml==1.0'
Install from the repository:
git clone https://github.com/HPCI-Lab/yProvML.git
cd yProvML
pip install -r requirements.txt
pip install .
# Or use apple extra if on a Mac
pip install .[apple]
# or install for specific arch
pip install .[nvidia] # or .[amd]
or simply:
pip install --no-cache-dir git+https://github.com/HPCI-Lab/yProvML
To install a specific branch of the library:
git clone https://github.com/HPCI-Lab/yProvML.git
cd yProvML
git switch development # or any other branch
pip install -r requirements.txt
pip install .
Before using the library, the user must set up the yProv4ML execution, as well as library specific configurations:
yprov4ml.start_run(
experiment_name: str,
prov_user_namespace: Optional[str] = None,
provenance_save_dir: Optional[str] = None,
collect_all_processes: Optional[bool] = False,
save_after_n_logs: Optional[int] = 100,
rank : Optional[int] = None,
metrics_file_type: str = "csv",
csv_separator : str = ",",
use_compressor: Optional[Union[CompressorType, bool]] = None,
use_run_id: Optional[int] = None,
)
The parameters are as follows:
Parameter Type Description
experiment_namestringRequired . Name of the experiment
prov_user_namespacestringOptional . User namespace for the provenance graph
provenance_save_dirstringOptional . Directory to save the provenance graph
collect_all_processesboolOptional . Whether to collect all processes
save_after_n_logsintOptional . Save the graph after n logs
rankintOptional . Rank of the process
metrics_file_typestrOptional . File format in which to save metrics: "csv" (default), "zarr" or "netcdf"
csv_separatorstrOptional . Separator used if metrics_file_type is MetricsType.CSV.
use_compressorOptional[Union[CompressorType, bool]]Optional . Compressor used for the run (CompressorType.ZIP, BLOSC_ZSTD, LZ4). BLOSC_ZSTD and LZ4 only apply to "zarr" metrics. If None, no compression is applied.
use_run_idOptional[int]Optional . Explicit run id to use instead of an auto-incremented one.
prov_user_namespace is a required string that defines the namespace under which all provenance data will be grouped. It helps in logically separating and organizing data across different users or projects, ensuring that the provenance graph remains structured and easily navigable.
collect_all_processes: A boolean flag that, when set to True, enables the collection of provenance data from all processes, which is particularly useful in multi-processing or distributed computing environments. By default, this is False, meaning only the main process (at rank 0) will be monitored unless otherwise specified.
save_after_n_logs: An optional integer that determines how frequently the provenance graph should be saved based on the number of logs collected. For example, if set to 100, the graph will be saved every 100 logs. This is essentially a caching system, which balances between execution time and RAM usage.
rank: This optional integer is used in distributed settings to specify the rank or ID of the currently collecting process. Leaving this parameter empty and collect_all_processes to False implies that only the process at rank 0 will collect data.
Note (4.0): disable_codecarbon and unify_experiments were removed, and log_carbon_metrics no longer exists. Energy and power are reported by log_system_metrics .
At the end of the experiment, the user must end the run:
yprov4ml.end_run(
create_graph: Optional[bool] = False,
create_svg: Optional[bool] = False,
crate_ro_crate: Optional[bool] = False,
create_card: Optional[bool] = False,
)
Parameter Type Description
create_graphOptional[bool]Optional . Whether to create the graph
create_svgOptional[bool]Optional . Whether to create the svg
crate_ro_crateOptional[bool]Optional . Indicates whether to pack the experiment in a ro-crate zip, containing all the run's information.
create_cardOptional[bool]Optional . Indicates whether to convert the created run directory to Workflow cards format.
This call allows the library to save the provenance graph in the specified directory.
⚠
If create_svg is True then create_graph has to be necessairly set to True, as the creation of the former requires the latter.
We allow to pack the entire experiment data as a RO-Crate to enable the user to easily share the final execution of his experiment.
Ontospy > https://hpci-lab.github.io/yProv4ML/ontology.html
<h1 class="title"><a href="" target="_blank">https://hpci-lab.github.io/yProv4ML/ontology.html</a></h1>
<h3><p>Ontology defining machine learning execution provenance matching yProv schema patterns.</p></h3>
<p><small>Ontology documentation automatically generated by <a class="greylink" href="http://lambdamusic.github.io/Ontospy/">Ontospy</a> on Tue, 20 Oct 2026 12:16:10</small></p>
<hr class="margintop">
<h1><a name="toc"> </a>Table of Content</h1>
<ul>
<li><a href="#ontologies">Ontologies</a></li>
<li><a href="#a-z">A-Z of Terms</a></li>
<li><a href="#classes">Classes</a></li>
<li><a href="#otherproperties">Other properties</a></li>
</ul>
<hr class="margintop">
<h1><a name="ontologies"></a>Ontologies</h1>
<fieldset> <legend><h3><a href="https://hpci-lab.github.io/yProv4ML/ontology.html" target="_blank">https://hpci-lab.github.io/yProv4ML/ontology.html</a></h3></legend>
<h4 style="margin-top: -20px;"><p>Ontology defining machine learning execution provenance matching yProv schema patterns.</p></h4>
<dl>
owl:versionInfo
1.1
rdf:type
http://www.w3.org/2002/07/owl#Ontology
rdfs:comment
Ontology defining machine learning execution provenance matching yProv schema patterns.
rdfs:label
yProv4ML Ontology
</fieldset>
<hr class="margintop">
<h1><a name="a-z"> </a>A-Z of terms</h1>
<div id="azterms">
This is a complete alphabetical A-Z index of all terms, by main logical type.
<fieldset> <legend>Classes (7)</legend>
<span><a href="#prov:Activity">prov:Activity</a></span>
|
<span><a href="#prov:Entity">prov:Entity</a></span>
|
<span><a href="#provml:Dataset">provml:Dataset</a></span>
|
<span><a href="#provml:HyperParameter">provml:HyperParameter</a></span>
|
<span><a href="#provml:Metric">provml:Metric</a></span>
|
<span><a href="#provml:Model">provml:Model</a></span>
|
<span><a href="#yprov4ml:ExecutionActivity">yprov4ml:ExecutionActivity</a></span>
</fieldset>
<fieldset> <legend>Other Properties (34)</legend>
<a href="#prov:finalMetricValue">prov:finalMetricValue</a>
| <a href="#yprov4ml:PID">yprov4ml:PID</a>
| <a href="#yprov4ml:artifactURI">yprov4ml:artifactURI</a>
| <a href="#yprov4ml:checksum">yprov4ml:checksum</a>
| <a href="#yprov4ml:context">yprov4ml:context</a>
| <a href="#yprov4ml:datasetStatBatchSize">yprov4ml:datasetStatBatchSize</a>
| <a href="#yprov4ml:datasetStatNumWorkers">yprov4ml:datasetStatNumWorkers</a>
| <a href="#yprov4ml:datasetStatShuffle">yprov4ml:datasetStatShuffle</a>
| <a href="#yprov4ml:datasetStatTotalBatches">yprov4ml:datasetStatTotalBatches</a>
| <a href="#yprov4ml:datasetStatTotalSamples">yprov4ml:datasetStatTotalSamples</a>
| <a href="#yprov4ml:datasetStatTotalSteps">yprov4ml:datasetStatTotalSteps</a>
| <a href="#yprov4ml:experimentDirectory">yprov4ml:experimentDirectory</a>
| <a href="#yprov4ml:experimentName">yprov4ml:experimentName</a>
| <a href="#yprov4ml:fileSizeInBytes">yprov4ml:fileSizeInBytes</a>
| <a href="#yprov4ml:fullLabel">yprov4ml:fullLabel</a>
| <a href="#yprov4ml:globalRank">yprov4ml:globalRank</a>
| <a href="#yprov4ml:hostName">yprov4ml:hostName</a>
| <a href="#yprov4ml:machine">yprov4ml:machine</a>
| <a href="#yprov4ml:meanMetricValue">yprov4ml:meanMetricValue</a>
| <a href="#yprov4ml:operatingSystem">yprov4ml:operatingSystem</a>
| <a href="#yprov4ml:parentModelTotalMemoryLoad">yprov4ml:parentModelTotalMemoryLoad</a>
| <a href="#yprov4ml:parentTotalParameters">yprov4ml:parentTotalParameters</a>
| <a href="#yprov4ml:parentWeightsMemoryLoad">yprov4ml:parentWeightsMemoryLoad</a>
| <a href="#yprov4ml:processor">yprov4ml:processor</a>
| <a href="#yprov4ml:provenancePath">yprov4ml:provenancePath</a>
| <a href="#yprov4ml:pythonVersion">yprov4ml:pythonVersion</a>
| <a href="#yprov4ml:release">yprov4ml:release</a>
| <a href="#yprov4ml:runID">yprov4ml:runID</a>
| <a href="#yprov4ml:runtimeType">yprov4ml:runtimeType</a>
| <a href="#yprov4ml:source">yprov4ml:source</a>
| <a href="#yprov4ml:timeZone">yprov4ml:timeZone</a>
| <a href="#yprov4ml:weightsModelTotalMemoryLoad">yprov4ml:weightsModelTotalMemoryLoad</a>
| <a href="#yprov4ml:weightsTotalParameters">yprov4ml:weightsTotalParameters</a>
| <a href="#yprov4ml:weightsWeightsMemoryLoad">yprov4ml:weightsWeightsMemoryLoad</a>
</fieldset>
</div>
<hr class="margintop">
<h1 class="margintop" ><a name="classes"> </a>Classes</h1>
<div class="entity-div">
<h3 class="entity-section">Class: <a name="prov:Activity" href="#prov:Activity">prov:Activity</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<div class="tree-container">
<div class="tree">
<ul>
<li href="#"><a>owl:Thing</a>
<ul>
<li><a style="font-weight: bold;">prov:Activity</a>
<ul>
<li><a href="#yprov4ml:ExecutionActivity">yprov4ml:ExecutionActivity</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Inherits from:</b> <br />owl:Thing</p>
<p class="section-desc"><b>Property Domain of:</b>
<br>
<a href="#yprov4ml:PID">yprov4ml:PID</a> | <a href="#yprov4ml:artifactURI">yprov4ml:artifactURI</a> | <a href="#yprov4ml:experimentDirectory">yprov4ml:experimentDirectory</a> | <a href="#yprov4ml:experimentName">yprov4ml:experimentName</a> | <a href="#yprov4ml:globalRank">yprov4ml:globalRank</a> | <a href="#yprov4ml:hostName">yprov4ml:hostName</a> | <a href="#yprov4ml:machine">yprov4ml:machine</a> | <a href="#yprov4ml:operatingSystem">yprov4ml:operatingSystem</a> | <a href="#yprov4ml:processor">yprov4ml:processor</a> | <a href="#yprov4ml:provenancePath">yprov4ml:provenancePath</a> | <a href="#yprov4ml:pythonVersion">yprov4ml:pythonVersion</a> | <a href="#yprov4ml:release">yprov4ml:release</a> | <a href="#yprov4ml:runID">yprov4ml:runID</a> | <a href="#yprov4ml:runtimeType">yprov4ml:runtimeType</a> | <a href="#yprov4ml:timeZone">yprov4ml:timeZone</a>
</p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code></code>
</div>
</div>
<div class="entity-div">
<h3 class="entity-section">Class: <a name="prov:Entity" href="#prov:Entity">prov:Entity</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<div class="tree-container">
<div class="tree">
<ul>
<li href="#"><a>owl:Thing</a>
<ul>
<li><a style="font-weight: bold;">prov:Entity</a>
<ul>
<li><a href="#provml:Dataset">provml:Dataset</a></li><li><a href="#provml:HyperParameter">provml:HyperParameter</a></li><li><a href="#provml:Metric">provml:Metric</a></li><li><a href="#provml:Model">provml:Model</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Inherits from:</b> <br />owl:Thing</p>
<p class="section-desc"><b>Property Domain of:</b>
<br>
<a href="#yprov4ml:fileSizeInBytes">yprov4ml:fileSizeInBytes</a> | <a href="#yprov4ml:fullLabel">yprov4ml:fullLabel</a>
</p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code></code>
</div>
</div>
<div class="entity-div">
<h3 class="entity-section">Class: <a name="provml:Dataset" href="#provml:Dataset">provml:Dataset</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<div class="tree-container">
<div class="tree">
<ul>
<li> <a href="#prov:Entity">prov:Entity</a>
<ul>
<li><a style="font-weight: bold;">provml:Dataset</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<p class="section-desc">
<small>NOTE</small> provml:Dataset is a leaf node.</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Inherits from <small>(1)</small>:</b>
<br />
<a href="#prov:Entity">prov:Entity</a>
</p>
<p class="section-desc"><b>Property Domain of:</b>
<br>
<a href="#yprov4ml:checksum">yprov4ml:checksum</a> | <a href="#yprov4ml:datasetStatBatchSize">yprov4ml:datasetStatBatchSize</a> | <a href="#yprov4ml:datasetStatNumWorkers">yprov4ml:datasetStatNumWorkers</a> | <a href="#yprov4ml:datasetStatShuffle">yprov4ml:datasetStatShuffle</a> | <a href="#yprov4ml:datasetStatTotalBatches">yprov4ml:datasetStatTotalBatches</a> | <a href="#yprov4ml:datasetStatTotalSamples">yprov4ml:datasetStatTotalSamples</a> | <a href="#yprov4ml:datasetStatTotalSteps">yprov4ml:datasetStatTotalSteps</a>
</p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix provml: <https://w3id.org/provml#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
provml:Dataset a rdfs:Class ;
rdfs:label "Dataset" ;
rdfs:subClassOf prov:Entity .
</div>
<div class="entity-div">
<h3 class="entity-section">Class: <a name="provml:HyperParameter" href="#provml:HyperParameter">provml:HyperParameter</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<div class="tree-container">
<div class="tree">
<ul>
<li> <a href="#prov:Entity">prov:Entity</a>
<ul>
<li><a style="font-weight: bold;">provml:HyperParameter</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<p class="section-desc">
<small>NOTE</small> provml:HyperParameter is a leaf node.</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Inherits from <small>(1)</small>:</b>
<br />
<a href="#prov:Entity">prov:Entity</a>
</p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix provml: <https://w3id.org/provml#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
provml:HyperParameter a rdfs:Class ;
rdfs:label "HyperParameter" ;
rdfs:subClassOf prov:Entity .
</div>
<div class="entity-div">
<h3 class="entity-section">Class: <a name="provml:Metric" href="#provml:Metric">provml:Metric</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<div class="tree-container">
<div class="tree">
<ul>
<li> <a href="#prov:Entity">prov:Entity</a>
<ul>
<li><a style="font-weight: bold;">provml:Metric</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<p class="section-desc">
<small>NOTE</small> provml:Metric is a leaf node.</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Inherits from <small>(1)</small>:</b>
<br />
<a href="#prov:Entity">prov:Entity</a>
</p>
<p class="section-desc"><b>Property Domain of:</b>
<br>
<a href="#prov:finalMetricValue">prov:finalMetricValue</a> | <a href="#yprov4ml:context">yprov4ml:context</a> | <a href="#yprov4ml:meanMetricValue">yprov4ml:meanMetricValue</a> | <a href="#yprov4ml:source">yprov4ml:source</a>
</p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix provml: <https://w3id.org/provml#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
provml:Metric a rdfs:Class ;
rdfs:label "Metric" ;
rdfs:subClassOf prov:Entity .
</div>
<div class="entity-div">
<h3 class="entity-section">Class: <a name="provml:Model" href="#provml:Model">provml:Model</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<div class="tree-container">
<div class="tree">
<ul>
<li> <a href="#prov:Entity">prov:Entity</a>
<ul>
<li><a style="font-weight: bold;">provml:Model</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<p class="section-desc">
<small>NOTE</small> provml:Model is a leaf node.</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Inherits from <small>(1)</small>:</b>
<br />
<a href="#prov:Entity">prov:Entity</a>
</p>
<p class="section-desc"><b>Property Domain of:</b>
<br>
<a href="#yprov4ml:parentModelTotalMemoryLoad">yprov4ml:parentModelTotalMemoryLoad</a> | <a href="#yprov4ml:parentTotalParameters">yprov4ml:parentTotalParameters</a> | <a href="#yprov4ml:parentWeightsMemoryLoad">yprov4ml:parentWeightsMemoryLoad</a> | <a href="#yprov4ml:weightsModelTotalMemoryLoad">yprov4ml:weightsModelTotalMemoryLoad</a> | <a href="#yprov4ml:weightsTotalParameters">yprov4ml:weightsTotalParameters</a> | <a href="#yprov4ml:weightsWeightsMemoryLoad">yprov4ml:weightsWeightsMemoryLoad</a>
</p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix provml: <https://w3id.org/provml#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
provml:Model a rdfs:Class ;
rdfs:label "Model" ;
rdfs:subClassOf prov:Entity .
</div>
<div class="entity-div">
<h3 class="entity-section">Class: <a name="yprov4ml:ExecutionActivity" href="#yprov4ml:ExecutionActivity">yprov4ml:ExecutionActivity</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<div class="tree-container">
<div class="tree">
<ul>
<li> <a href="#prov:Activity">prov:Activity</a>
<ul>
<li><a style="font-weight: bold;">yprov4ml:ExecutionActivity</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<p class="section-desc">
<small>NOTE</small> yprov4ml:ExecutionActivity is a leaf node.</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Inherits from <small>(1)</small>:</b>
<br />
<a href="#prov:Activity">prov:Activity</a>
</p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:ExecutionActivity a rdfs:Class ;
rdfs:label "Execution Activity" ;
rdfs:subClassOf prov:Activity .
</div>
<hr class="margintop">
<h1 class="margintop"><a name="otherproperties"> </a>Other Properties</h1>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="prov:finalMetricValue" href="#prov:finalMetricValue">prov:finalMetricValue</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> prov:finalMetricValue is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Metric">provml:Metric</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:double">xsd:double</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix provml: <https://w3id.org/provml#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
prov:finalMetricValue a rdf:Property ;
rdfs:domain provml:Metric ;
rdfs:range xsd:double .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:PID" href="#yprov4ml:PID">yprov4ml:PID</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:PID is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:PID a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:artifactURI" href="#yprov4ml:artifactURI">yprov4ml:artifactURI</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:artifactURI is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:artifactURI a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:checksum" href="#yprov4ml:checksum">yprov4ml:checksum</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:checksum is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Dataset">provml:Dataset</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:checksum a rdf:Property ;
rdfs:domain provml:Dataset ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:context" href="#yprov4ml:context">yprov4ml:context</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:context is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Metric">provml:Metric</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:context a rdf:Property ;
rdfs:domain provml:Metric ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:datasetStatBatchSize" href="#yprov4ml:datasetStatBatchSize">yprov4ml:datasetStatBatchSize</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:datasetStatBatchSize is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Dataset">provml:Dataset</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:datasetStatBatchSize a rdf:Property ;
rdfs:domain provml:Dataset ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:datasetStatNumWorkers" href="#yprov4ml:datasetStatNumWorkers">yprov4ml:datasetStatNumWorkers</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:datasetStatNumWorkers is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Dataset">provml:Dataset</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:datasetStatNumWorkers a rdf:Property ;
rdfs:domain provml:Dataset ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:datasetStatShuffle" href="#yprov4ml:datasetStatShuffle">yprov4ml:datasetStatShuffle</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:datasetStatShuffle is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Dataset">provml:Dataset</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:boolean">xsd:boolean</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:datasetStatShuffle a rdf:Property ;
rdfs:domain provml:Dataset ;
rdfs:range xsd:boolean .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:datasetStatTotalBatches" href="#yprov4ml:datasetStatTotalBatches">yprov4ml:datasetStatTotalBatches</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:datasetStatTotalBatches is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Dataset">provml:Dataset</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:datasetStatTotalBatches a rdf:Property ;
rdfs:domain provml:Dataset ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:datasetStatTotalSamples" href="#yprov4ml:datasetStatTotalSamples">yprov4ml:datasetStatTotalSamples</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:datasetStatTotalSamples is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Dataset">provml:Dataset</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:datasetStatTotalSamples a rdf:Property ;
rdfs:domain provml:Dataset ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:datasetStatTotalSteps" href="#yprov4ml:datasetStatTotalSteps">yprov4ml:datasetStatTotalSteps</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:datasetStatTotalSteps is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Dataset">provml:Dataset</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:datasetStatTotalSteps a rdf:Property ;
rdfs:domain provml:Dataset ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:experimentDirectory" href="#yprov4ml:experimentDirectory">yprov4ml:experimentDirectory</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:experimentDirectory is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:experimentDirectory a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:experimentName" href="#yprov4ml:experimentName">yprov4ml:experimentName</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:experimentName is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:experimentName a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:fileSizeInBytes" href="#yprov4ml:fileSizeInBytes">yprov4ml:fileSizeInBytes</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:fileSizeInBytes is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Entity">prov:Entity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:fileSizeInBytes a rdf:Property ;
rdfs:domain prov:Entity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:fullLabel" href="#yprov4ml:fullLabel">yprov4ml:fullLabel</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:fullLabel is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Entity">prov:Entity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:fullLabel a rdf:Property ;
rdfs:domain prov:Entity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:globalRank" href="#yprov4ml:globalRank">yprov4ml:globalRank</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:globalRank is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:globalRank a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:hostName" href="#yprov4ml:hostName">yprov4ml:hostName</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:hostName is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:hostName a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:machine" href="#yprov4ml:machine">yprov4ml:machine</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:machine is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:machine a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:meanMetricValue" href="#yprov4ml:meanMetricValue">yprov4ml:meanMetricValue</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:meanMetricValue is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Metric">provml:Metric</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:double">xsd:double</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:meanMetricValue a rdf:Property ;
rdfs:domain provml:Metric ;
rdfs:range xsd:double .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:operatingSystem" href="#yprov4ml:operatingSystem">yprov4ml:operatingSystem</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:operatingSystem is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:operatingSystem a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:parentModelTotalMemoryLoad" href="#yprov4ml:parentModelTotalMemoryLoad">yprov4ml:parentModelTotalMemoryLoad</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:parentModelTotalMemoryLoad is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Model">provml:Model</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:double">xsd:double</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:parentModelTotalMemoryLoad a rdf:Property ;
rdfs:domain provml:Model ;
rdfs:range xsd:double .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:parentTotalParameters" href="#yprov4ml:parentTotalParameters">yprov4ml:parentTotalParameters</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:parentTotalParameters is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Model">provml:Model</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:int">xsd:int</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:parentTotalParameters a rdf:Property ;
rdfs:domain provml:Model ;
rdfs:range xsd:int .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:parentWeightsMemoryLoad" href="#yprov4ml:parentWeightsMemoryLoad">yprov4ml:parentWeightsMemoryLoad</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:parentWeightsMemoryLoad is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Model">provml:Model</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:double">xsd:double</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:parentWeightsMemoryLoad a rdf:Property ;
rdfs:domain provml:Model ;
rdfs:range xsd:double .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:processor" href="#yprov4ml:processor">yprov4ml:processor</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:processor is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:processor a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:provenancePath" href="#yprov4ml:provenancePath">yprov4ml:provenancePath</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:provenancePath is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:provenancePath a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:pythonVersion" href="#yprov4ml:pythonVersion">yprov4ml:pythonVersion</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:pythonVersion is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:pythonVersion a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:release" href="#yprov4ml:release">yprov4ml:release</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:release is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:release a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:runID" href="#yprov4ml:runID">yprov4ml:runID</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:runID is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:runID a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:runtimeType" href="#yprov4ml:runtimeType">yprov4ml:runtimeType</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:runtimeType is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:runtimeType a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:source" href="#yprov4ml:source">yprov4ml:source</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:source is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Metric">provml:Metric</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:source a rdf:Property ;
rdfs:domain provml:Metric ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:timeZone" href="#yprov4ml:timeZone">yprov4ml:timeZone</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:timeZone is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#prov:Activity">prov:Activity</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:string">xsd:string</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix prov: <http://www.w3.org/ns/prov#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:timeZone a rdf:Property ;
rdfs:domain prov:Activity ;
rdfs:range xsd:string .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:weightsModelTotalMemoryLoad" href="#yprov4ml:weightsModelTotalMemoryLoad">yprov4ml:weightsModelTotalMemoryLoad</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:weightsModelTotalMemoryLoad is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Model">provml:Model</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:double">xsd:double</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:weightsModelTotalMemoryLoad a rdf:Property ;
rdfs:domain provml:Model ;
rdfs:range xsd:double .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:weightsTotalParameters" href="#yprov4ml:weightsTotalParameters">yprov4ml:weightsTotalParameters</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:weightsTotalParameters is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Model">provml:Model</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:int">xsd:int</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:weightsTotalParameters a rdf:Property ;
rdfs:domain provml:Model ;
rdfs:range xsd:int .
</div>
<div class="entity-div">
<h3 class="entity-section">Property: <a name="yprov4ml:weightsWeightsMemoryLoad" href="#yprov4ml:weightsWeightsMemoryLoad">yprov4ml:weightsWeightsMemoryLoad</a>
<small> <a href="#a-z" class="backlink">back to top</a></small>
</h3>
<hr>
<p class="section-desc">
<small>NOTE</small> yprov4ml:weightsWeightsMemoryLoad is a leaf node.</p>
<p class="section-desc"><b>Type:</b>
rdf:Property
</p>
<p class="section-desc"><b>Description</b>
<br>
</p>
<p class="section-desc"><b>Class Domain for:</b>
<br>
<a href="#provml:Model">provml:Model</a> </p>
<p class="section-desc"><b>Class Range for:</b>
<br>
<a href="#xsd:double">xsd:double</a> </p>
<small class="implementation_title">Implementation:</small>
<div class="implementation">
<code><p>@prefix provml: <https://w3id.org/provml#> .<br>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yprov4ml: <https://hpci-lab.github.io/yProv4ML/ontology.html#> .
yprov4ml:weightsWeightsMemoryLoad a rdf:Property ;
rdfs:domain provml:Model ;
rdfs:range xsd:double .
</div>
<hr>
<small>Ontology documentation automatically generated by <a class="greylink" href="http://lambdamusic.github.io/Ontospy/">Ontospy</a> v2.6 on Tue, 20 Oct 2026 12:16:10</small>
The standard method to generate the .dot file containing the provenance graph is to set the create_graph parameter to True.
If the user necessitates to turn a PROV-JSON created with yProv4ML into a .dot file, the following code command can be used:
python -m yprov4ml.prov2dot --prov_json prov.json --output prov_graph.dot
The standard method to generate the .svg image of the provenance graph is to set the create_svg parameter to True.
In this case both create_graph and create_svghave to be set to True.
If the user necessitates to turn a .dot file into a .svg file, the following code command can be used:
python -m yprov4ml.dot2svg --dot prov_graph.dot --output prov_graph.svg
Or alternatively, using directly the Graphviz suite:
dot -Tsvg -O prov_graph.dot
yProv4ML additionally has a built-in script to convert run directories (or PROV-JSONL files, such as the ones created using Flowcept ) to Workflow Cards .
To convert a run directory, the user can run:
python -m yprov4ml.prov2card --path <path to jsonl or run_dir>
specifying either the desired run directory (i.e. example_0) or a JSONL file (i.e. flowcept_buffer.jsonl). The optional --output_dir argument sets where the card is written. Cards can also be created directly with end_run(create_card=True).
In 4.0 the context of the information is expressed through the is_input_to and is_output_to arguments: strings naming the activities that consume or produce the item (for instance "Training_0", "Validation_0", "Testing_0").
To specify arbitrary training parameters used during the execution of the experiment, the user can call the following function.
yprov4ml.log_param(
key: str,
value: Any,
is_input_to : Optional[str] = None,
is_output_to : Optional[str] = None
)
Parameter Type Description
keystringRequired . Name of the parameter
valuestringRequired . Value of the parameter
is_input_toOptional[str]Optional . Activity that uses the parameter as input
is_output_toOptional[str]Optional . Activity or tool that produced the parameter
To log artifacts, the user can call the following function.
yprov4ml.log_artifact(
artifact_name : str,
artifact_path : str,
is_input_to : Optional[str] = None,
is_output_to : Optional[str] = None,
step: int = 0,
is_model : bool = False,
other_attrs : Optional[dict] = None,
)
Parameter Type Description
artifact_namestringRequired . Label to give to the artifact
artifact_pathstringRequired . Path to the artifact
is_input_toOptional[str]Optional . Activity that uses the artifact as input
is_output_toOptional[str]Optional . Activity that generates the artifact
stepintOptional . Step of the artifact (default 0)
is_modelboolOptional . Whether the artifact is a model
other_attrsOptional[dict]Optional . Extra PROV attributes to attach to the artifact entity
The function logs the artifact in the current experiment. The artifact can be a file or a directory.
All logged artifacts are saved in the artifacts directory of the current experiment, while the related information is saved in the PROV-JSON file, along with a reference to the file.
Use is_input_to for artifacts consumed by an activity (e.g. pretrained model weights) and is_output_to for artifacts it produces.
yprov4ml.log_model(
model_name: str,
model: Union[torch.nn.Module, Any],
is_input_to : Optional[str] = None,
is_output_to : Optional[str] = None,
log_model_info: bool = True,
log_model_layers : bool = False,
other_attrs : Optional[dict] = None,
)
Parameter Type Description
model_namestringRequired . Name of the model
modelUnion[torch.nn.Module, Any]Required . The model to be logged
is_input_toOptional[str]Optional . Activity that uses the model as input
is_output_toOptional[str]Optional . Activity that produces the model
log_model_infoboolOptional . Whether to log model information
log_model_layersboolOptional . Whether to log model layers
other_attrsOptional[dict]Optional . Extra PROV attributes to attach to the model entity
It sets the model for the current experiment. It can be called anywhere before the end of the experiment.
The same call also logs some model information, such as the number of parameters and the model architecture memory footprint.
The saving of these information can be toggled with the log_model_info = False parameter.
The model layers details can be logged in an external .json file, which will be linked to the provenance file as an artefact.
The parameters saved for each layer depend on the type of the latter, but generally include input and output size, as well as dtype.
yprov4ml.save_model_version(
model_name: str,
model: Union[torch.nn.Module, Any],
is_input_to : Optional[str] = None,
is_output_to : Optional[str] = None,
step: Optional[int] = None,
other_attrs : Optional[dict] = None,
)
The save_model_version function saves the state of a PyTorch model and logs it as an artifact, enabling version control and tracking within machine learning experiments.
Parameter Type Description
model_nameUnion[str, Path]Required . The name (or path) under which to save the model; a .pt suffix is added if missing.
modeltorch.nn.ModuleRequired . The PyTorch model to be saved.
is_input_toOptional[str]Optional . Activity that uses the model as input.
is_output_toOptional[str]Optional . Activity that produces the model.
stepOptional[int]Optional . The step or epoch number associated with the saved model.
other_attrsOptional[dict]Optional . Extra PROV attributes to attach to the entity.
This function saves the model's state dictionary to a specified directory and logs the saved model file as an artifact for provenance tracking. It then logs the saved model file using log_artifact.
yProv4ML offers helper functions to log information and stats on specific datasets.
yprov4ml.log_dataset(
dataset_label : str,
dataset : Union[DataLoader, Subset, Dataset],
is_input_to : Optional[str] = None,
is_output_to : Optional[str] = None,
log_dataset_info : bool = True,
other_attrs : dict = {}
)
Parameter Type Description
dataset_labelstringRequired . The label of the dataset
datasetUnion[DataLoader, Subset, Dataset]Required . The dataset to be logged
is_input_toOptional[str]Optional . Activity that uses the dataset as input
is_output_toOptional[str]Optional . Activity that produces the dataset
log_dataset_infoboolOptional . Whether to log the dataset information
other_attrsdictOptional . Extra PROV attributes to attach to the dataset entity
The function logs the dataset in the current experiment. The dataset can be a DataLoader, a Subset, or a Dataset class from pytorch.
A SHA-256 checksum of the dataset is always recorded. Parameters which are logged include batch size, number of workers, whether the dataset is shuffled, the number of batches and the number of total samples.
yProv4ML offers helper wrappers to log information automatically.
‼
These are only supported for PyTorch objects.
class ProvenanceTrackedFunction:
def __init__(self,
func : Any,
is_input_to : Optional[str] = None,
is_output_to : Optional[str] = None
)
Parameter Type Default Description
func Any Required The target callable function or object to wrap (e.g., PyTorch loss function or metric evaluator).
is_input_to Optional[str] None Activity the call is an input to; defaults to the wrapped object's type name.
is_output_to Optional[str] None Activity or tool that produces the output.
class WeightDistributionTrackedModel(nn.Module):
def __init__(self,
model_label : str,
model : Any,
is_input_to : Optional[str] = None,
is_output_to : Optional[str] = None,
chunk_size : int = 64
)
Tracks per-layer weight statistics per epoch. Arguments follow the same convention as the other 4.0 logging calls.
class ProvenanceTrackedModel(nn.Module):
def __init__(self,
model_label : str,
model : Any,
context : Optional[str] = None,
chunk_size : int = 64
)
Parameter Type Default Description
model_labelstrRequired Label identifier for the model. Used as the output Zarr dataset name (<model_label>.zarr).
modelAny (nn.Module)Required The underlying PyTorch model instance to track.
contextOptional[str]NoneOptional execution context (e.g. stage or step name) associated with provenance tracking.
chunk_sizeint64Zarr chunk dimension along the batch axis for layer datasets.
This section covers the different types of metrics which can be collected using yProv4ml. These metrics provide insights into efficiency, resource usage, and overall effectiveness. Below is an overview of the key metric categories:
General Metrics : Covers customized, user-defined metrics
System Metrics : Covers performance-related metrics such as CPU usage, memory consumption, and GPU stats.
Time Metrics : Offers directives for time-based measurements.
Each subsection provides detailed explanations and methodologies for tracking and interpreting these metrics.
To specify metrics, which can be tracked during the execution of the experiment, the user can call the following function.
yprov4ml.log_metric(
key: str,
value: float,
is_input_to: Optional[str] = None,
step: int = 0,
is_output_to: Optional[str] = None,
timestamp : Optional[int] = None
)
Parameter Type Description
keystringRequired . Name of the metric
valuefloatRequired . Value of the metric
is_input_toOptional[str]Optional . Name of the activity (e.g. "Training_0") that consumes the metric
stepintOptional . Step of the metric (default 0)
is_output_toOptional[str]Optional . Name of the activity or tool that produced the metric
timestampOptional[int]Optional . Time of logging in milliseconds; defaults to the current time
The step parameter is optional and can be used to specify the current time step of the experiment, for example the current epoch, it defaults to 0.
Note (4.0): the Context enum and the context/source arguments were replaced by is_input_to and is_output_to, which link the metric to activities in the provenance graph. They are plain strings (e.g. "Training_0", "Validation_0").
The yprov4ml.log_system_metrics function logs critical system performance metrics during machine learning experiments.
The information logged is related to the time between the last call to the function and the current call.
yprov4ml.log_system_metrics(
is_input_to: Optional[str] = None,
is_output_to: Optional[str] = None,
step: int = 0,
)
Parameter Type Description
is_input_toOptional[str]Optional . Activity that consumes the metrics
is_output_toOptional[str]Optional . Producer of the metrics; defaults to the detected hardware access mode
stepintOptional . Step of the metric (default 0)
This function logs the following system metrics:
Parameter Description Unit
cpu_usage_pctCPU utilization percentage %
cpu_powerPower consumed by the CPU Watts (W)
cpu_energyEnergy consumed by the CPU over the logging interval Joules (J)
ram_usage_pctPercentage of total RAM used %
ram_usage_gbAmount of RAM used in gigabytes Gigabytes (GB)
ram_powerPower consumed by the system RAM Watts (W)
ram_energyEnergy consumed by RAM over the logging interval Joules (J)
disk_usage_gbAmount of disk space used in gigabytes Gigabytes (GB)
disk_usage_pctPercentage of total disk space used %
gpu_usage_pctGPU compute utilization percentage %
gpu_powerPower consumed by the GPU Watts (W)
gpu_energyEnergy consumed by the GPU over the logging interval Joules (J)
gpu_memory_usage_gbAmount of GPU VRAM used in gigabytes Gigabytes (GB)
gpu_memory_usage_pctPercentage of GPU VRAM used %
gpu_memory_powerPower consumed by the GPU VRAM module Watts (W)
gpu_temperature_cTemperature of the GPU core Degrees Celsius (°C)
The log_flops_per_epoch function logs the number of floating-point operations (FLOPs) performed per epoch for a given model and dataset.
yprov4ml.log_flops_per_epoch(
label: str,
model: Union[torch.nn.Module, Any],
dataset: Union[torch.utils.data.Dataset, torch.utils.data.DataLoader, torch.utils.data.Subset],
is_input_to: Optional[str] = None,
is_output_to: Optional[str] = 'fvcore.nn.FlopCountAnalysis',
step: int = 0
):
Parameter Type Description
labelstringRequired . Label of the FLOPs
modelUnion[torch.nn.Module, Any]Required . Model used for the FLOPs calculation
datasetDataset \| DataLoader \| SubsetRequired . Dataset used for the FLOPs calculation
is_input_toOptional[str]Optional . Activity that consumes the metric
is_output_toOptional[str]Optional . Producer of the metric (default fvcore.nn.FlopCountAnalysis)
stepintOptional . Step of the metric (default 0)
The log_flops_per_batch function logs the number of floating-point operations (FLOPs) performed per batch for a given model and batch of data.
yprov4ml.log_flops_per_batch(
label: str,
model: Union[torch.nn.Module, Any],
batch: Any,
is_input_to: Optional[str] = None,
is_output_to: Optional[str] = 'fvcore.nn.FlopCountAnalysis',
step: int = 0,
):
Parameter Type Description
labelstringRequired . Label of the FLOPs
modelUnion[torch.nn.Module, Any]Required . Model used for the FLOPs calculation
batchAnyRequired . Batch of data used for the FLOPs calculation
is_input_toOptional[str]Optional . Activity that consumes the metric
is_output_toOptional[str]Optional . Producer of the metric (default fvcore.nn.FlopCountAnalysis)
stepintOptional . Step of the metric (default 0)
yprov4ml.log_current_execution_time(
label: str,
is_input_to: Optional[str] = None,
is_output_to: Optional[str] = 'std.time',
step: Optional[int] = None
)
Parameter Type Description
labelstringRequired . Label of the code portion
is_input_toOptional[str]Optional . Activity that consumes the metric
is_output_toOptional[str]Optional . Producer of the metric (default std.time)
stepintOptional . Step of the metric
‼
This feature is still under development
With workflow streamlined by yProv4ML, it is trivial to guarantee reproducibility of experiments even just sharing a single provenance file.
To guarantee the necessary amount of information are present in the prov.json file however, some calls to the library have to be executed.
def log_execution_command(full_command_str : Optional[str] = None, path : Optional[str] = None): ...
Logs the execution command for it to be retrieved by the reproduction script later. If omitted, the current interpreter and sys.argv are used.
def log_source_code(use_git : bool = False): ...
Requests logging of the source code at end_run. With use_git=True the repository link and commit hash are logged as a parameter. This could be a single python file (e.g. main.py), a repository link (if the path is not specified in the arguments), or an entire directory of source files.
In case the source code is not on github, the source files are all copied inside the artifacts directory, and the path logged inside the provenance file will reference whis copy.
⚠
Currently, the order of logging of inputs and outputs does matter, which means that concurrent executions will have to log information in order, for a run to be considered reproducible.
yProv4ml offers a set of directives to easily extract the information logged from the provenance.json file.
⚠
All these functions expect the data to be passed to be a dictionary (json file opened in python). When using a provenance json file coming from yProv4ML, this can be easily obtained following the example below.
Example:
from yprov4ml.getters import (
list_activities,
list_entities,
get_parameter,
list_parameters,
list_metrics,
list_metric_paths,
get_metric,
list_runs_in_proj,
list_provjson_in_proj
)
import json
data = json.load(open(path_to_prov_json))
### Utility Functions
def list_activities(source : dict | str) -> list[str]
def list_entities(source : dict | str, entity_type: str | None = None) -> list[str]
list_activities : Retrieves a list of all activity names stored in the provenance document.
list_entities : Retrieves a list of entity names from the provenance document. Can be filtered by passing an explicit entity_type (e.g., "provml:Metric").
def get_parameter(source : dict | str, name: str, param: str, unwrap: bool = True) -> Any
Retrieves a single parameter value associated with a specified activity or entity key name.
Parameter Type Default Description
sourcedict \| strRequired Loaded PROV dictionary or file path.
namestrRequired Name of the activity or entity.
paramstrRequired Specific attribute or parameter key to extract.
unwrapboolTrueAutomatically unwraps PROV typed-literals into native Python values.
def list_parameters(data : dict | str, name: str | None = None, unwrap: bool = True) -> dict[str, Any]
Retrieves a dictionary of key-value parameters. If name is omitted, it aggregates parameters across all entities and activities in the file.
Parameter Type Default Description
datadict \| strRequired Loaded PROV dictionary or file path.
namestr \| NoneNoneTarget activity/entity name. If None, extracts all available parameters.
unwrapboolTrueAutomatically unwraps PROV typed-literals into native Python values.
def list_metrics(data : dict | str, context: str | None = None, source: str | None = None) -> pd.DataFrame
Summarizes all metric entities recorded in the provenance JSON into a single Pandas DataFrame with metadata columns (label, context, source, csv_path).
def list_metric_paths(data : dict | str, context: str | None = None, source : str | None = None, file_type : str | None = None) -> dict[str, str]
Returns a dictionary mapping metric entity identifiers to their underlying dataset file paths.
def get_metric(data : dict | str, name: str | None = None, context: str | None = None, source : str | None = None)
Fetches and automatically loads the data object for a metric (named in the format {name}_{context}_{source}) using the appropriate reader.
def list_runs_in_proj(path: str | Path) -> list[Path]
def list_provjson_in_proj(path : str | Path) -> list[Path]
list_runs_in_proj : Returns paths to all run subdirectories found within a given project folder.
list_provjson_in_proj : Searches across run directories to locate all available .json provenance files.
⚠
Viewing metrics data depends on the way it is saved in the experiment.
- If `"csv"` is used, we suggest opening it with [pandas](https://pandas.pydata.org/)
- If `"zarr"` or `"netcdf"` are used, then either [xarray](https://docs.xarray.dev/en/stable/index.html) or an ad-hoc library ([zarr-python](https://zarr.readthedocs.io/en/stable/) and [netcdf4](https://pypi.org/project/netCDF4/)) can be used.
A set of 5 examples are provided:
This section provides an example of how to use Prov4ML with PyTorch.
The following code snippet shows how to log metrics, system metrics, and model versions in a PyTorch training loop.
Example:
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchvision.datasets import MNIST
from torchvision import transforms
from torch.utils.data import DataLoader, Subset
from tqdm import tqdm
import yprov4ml
PATH_DATASETS = "./data"
BATCH_SIZE = 32
EPOCHS = 15
DEVICE = "cpu"
TYPE = "zarr"
COMP = False
# Start a new provenance logging run.
# Specify the user namespace, experiment name,
# and directory to store the provenance data.
# Metrics are flushed to disk every 100 logs.
yprov4ml.start_run(
prov_user_namespace="www.example.org",
experiment_name=f"{TYPE}_{COMP}",
provenance_save_dir="prov",
save_after_n_logs=100,
collect_all_processes=True,
metrics_file_type=TYPE,
use_compressor=COMP,
)
class MNISTModel(nn.Module):
def __init__(self):
super().__init__()
self.model = torch.nn.Sequential(
torch.nn.Linear(28 * 28, 10),
)
def forward(self, x):
return self.model(x.view(x.size(0), -1))
mnist_model = MNISTModel().to(DEVICE)
tform = transforms.Compose([
transforms.RandomRotation(10),
transforms.RandomHorizontalFlip(),
transforms.RandomVerticalFlip(),
transforms.ToTensor()
])
# Log the transformation applied to the dataset as a parameter.
yprov4ml.log_param("dataset transformation", tform)
train_ds = MNIST(PATH_DATASETS, train=True, download=True, transform=tform)
train_loader = DataLoader(train_ds, batch_size=BATCH_SIZE)
# Log metadata about the training dataset (e.g., source, size, structure).
yprov4ml.log_dataset("train_dataset", train_loader, is_input_to="Training_0")
test_ds = MNIST(PATH_DATASETS, train=False, download=True, transform=tform)
test_loader = DataLoader(test_ds, batch_size=BATCH_SIZE)
# Log metadata about the validation dataset.
yprov4ml.log_dataset("val_dataset", test_loader, is_input_to="Validation_0")
optim = torch.optim.Adam(mnist_model.parameters(), lr=0.001)
# Log the optimizer type used in training.
yprov4ml.log_param("optimizer", "Adam")
loss_fn = nn.MSELoss().to(DEVICE)
# Log the loss function used to compute training and validation loss.
yprov4ml.log_param("loss_fn", "MSELoss")
losses = []
for epoch in range(EPOCHS):
mnist_model.train()
for i, (x, y) in tqdm(enumerate(train_loader)):
x, y = x.to(DEVICE), y.to(DEVICE)
optim.zero_grad()
y_hat = mnist_model(x)
y = F.one_hot(y, 10).float()
loss = loss_fn(y_hat, y)
loss.backward()
optim.step()
losses.append(loss.item())
# Log the training loss value for the current step (epoch).
# is_input_to links the metric to the training activity.
yprov4ml.log_metric("Loss", loss.item(), is_input_to="Training_0", step=epoch)
# Log system-level metrics (CPU/RAM/GPU usage, power, energy) during training.
yprov4ml.log_system_metrics(is_input_to="Training_0", step=epoch)
# Save the current version of the model as an output of the training activity.
# The model weights are saved incrementally in the experiment directory
yprov4ml.save_model_version("mnist_model_version", mnist_model, is_output_to="Training_0", step=epoch)
mnist_model.eval()
for i, (x, y) in tqdm(enumerate(test_loader)):
x, y = x.to(DEVICE), y.to(DEVICE)
y_hat = mnist_model(x)
y2 = F.one_hot(y, 10).float()
loss = loss_fn(y_hat, y2)
# Log the validation loss value for the current step (epoch).
# is_input_to links the metric to the validation activity.
yprov4ml.log_metric("Loss", loss.item(), is_input_to="Validation_0", step=epoch)
# Log the final trained model under a given name.
# This allows later retrieval, sharing, or deployment of the model.
yprov4ml.log_model("mnist_model_final", mnist_model, is_output_to="Training_0")
# Ends the current run and finalizes provenance logging.
# If `create_graph` is True, it generates a complete provenance graph.
# If `create_svg` is True, an SVG visualization of the graph is also created.
yprov4ml.end_run(create_graph=True, create_svg=True, crate_ro_crate=True)
This section provides an example of how to use Prov4ML with PyTorch Lightning.
In any lightning module the calls to train_step, validation_step, and test_step can be overridden to log the necessary information.
Example:
def training_step(self, batch, batch_idx):
x, y = batch
y_hat = self(x)
loss = self.loss(y_hat, y)
yprov4ml.log_metric("MSE_train", loss.item(), is_input_to="Training_0", step=self.current_epoch)
yprov4ml.log_flops_per_batch("train_flops", self, batch, is_input_to="Training_0", step=self.current_epoch)
return loss
This will log the mean squared error and the number of flops per batch for each the training step.
Alternatively, the on_train_epoch_end method can be overridden to log information at the end of each epoch.
Example:
import lightning as L
from lightning.pytorch import LightningModule
import torch
import torch.nn.functional as F
from torchvision.datasets import MNIST
from torchvision import transforms
from torch.utils.data import DataLoader, Subset
import yprov4ml
from yprov4ml import yProvMLLogger
PATH_DATASETS = "./data"
BATCH_SIZE = 64
EPOCHS = 2
class MNISTModel(LightningModule):
def __init__(self):
super().__init__()
self.model = torch.nn.Sequential(
torch.nn.Linear(28 * 28, 10),
)
def forward(self, x):
return self.model(x.view(x.size(0), -1))
def training_step(self, batch, _):
x, y = batch
loss = F.cross_entropy(self(x), y)
# Log the training loss through the yProvMLLogger automatically
# In this case is_input_to/is_output_to are set by the logger.
# For finer control,
# use the standard yprov4ml.log_metric() call
self.log("MSE_train", loss.item(), on_step=True, on_epoch=False, prog_bar=True, sync_dist=True)
return loss
def validation_step(self, batch, _):
x, y = batch
loss = F.cross_entropy(self(x), y)
# Log the validation loss through the yProvMLLogger automatically
self.log("MSE_val", loss)
return loss
def test_step(self, batch, _):
x, y = batch
loss = F.cross_entropy(self(x), y)
# Log the testing loss through the yProvMLLogger automatically
self.log("MSE_test",loss)
return loss
def on_train_epoch_end(self) -> None:
# All standard prov4ml directives work the same way as before,
# the whole context is set up by the logger.
yprov4ml.log_metric("epoch", self.current_epoch, is_input_to="Training_0", step=self.current_epoch)
yprov4ml.save_model_version(f"model_version_{self.current_epoch}", self, is_output_to="Training_0", step=self.current_epoch)
yprov4ml.log_system_metrics(is_input_to="Training_0", step=self.current_epoch)
yprov4ml.log_current_execution_time("train_epoch_time", is_input_to="Training_0", step=self.current_epoch)
def configure_optimizers(self):
optim = torch.optim.Adam(self.parameters(), lr=0.0002)
yprov4ml.log_param("optimizer", optim)
return optim
mnist_model = MNISTModel()
tform = transforms.Compose([
transforms.RandomRotation(10),
transforms.RandomHorizontalFlip(),
transforms.RandomVerticalFlip(),
transforms.ToTensor()
])
# Log the dataset transformation as one-time parameter
# This works even when not calling start_run(),
# as long as a yProvMLLogger is added to the training
yprov4ml.log_param("dataset_transformation", tform)
train_ds = MNIST(PATH_DATASETS, train=True, download=True, transform=tform)
val_ds = Subset(train_ds, range(BATCH_SIZE * 1))
train_ds = Subset(train_ds, range(BATCH_SIZE * 10))
train_loader = DataLoader(train_ds, batch_size=BATCH_SIZE)
val_loader = DataLoader(val_ds, batch_size=BATCH_SIZE)
yprov4ml.log_dataset("train_dataset", train_loader)
yprov4ml.log_dataset("val_dataset", val_loader)
trainer = L.Trainer(
accelerator="cuda",
devices=1,
max_epochs=EPOCHS,
# The logger has to be added to the corresponding parameter in pytorch lightning
logger=[yProvMLLogger()],
enable_checkpointing=False,
log_every_n_steps=1
)
trainer.fit(mnist_model, train_loader, val_dataloaders=val_loader)
yprov4ml.log_model("model_version_final", mnist_model)
test_ds = MNIST(PATH_DATASETS, train=False, download=True, transform=tform)
test_ds = Subset(test_ds, range(BATCH_SIZE * 2))
test_loader = DataLoader(test_ds, batch_size=BATCH_SIZE)
yprov4ml.log_dataset("test_dataset", test_loader)
result = trainer.test(mnist_model, test_loader)
When integrating with lightning, a much easier way to produce the provenance graph is through the yProvMLLogger, optionally paired with yProvMLCallback (which logs models, datasets and checkpoints).
Example:
from yprov4ml import yProvMLLogger, yProvMLCallback
trainer = L.Trainer(
accelerator="cuda",
devices=1,
max_epochs=EPOCHS,
enable_checkpointing=False,
log_every_n_steps=1,
logger=[yProvMLLogger()],
callbacks=[yProvMLCallback()],
)
When logging in such a way, there is no need to call the start_run and end_run directives, and everything will be logged automatically.
If necessary, it's still possible to call all yprov4ml directives, such as log_param and log_metrics, and the data will be saved in the current execution directory.
‼
The ItwinAI logger must be imported from `yprov4ml.loggers.prov4ml_itwinai_logger`; it is not exported at the top level.
This section provides an example of how to use Prov4ML with PyTorch Lightning.
In any lightning module the calls to train_step, validation_step, and test_step can be overridden to log the necessary information.
Example:
from yprov4ml.loggers.prov4ml_itwinai_logger import ProvMLItwinAILogger
trainer = L.Trainer(
accelerator="cuda",
devices=1,
max_epochs=EPOCHS,
enable_checkpointing=False,
log_every_n_steps=1,
logger=[ProvMLItwinAILogger()],
)
‼
This feature is still under development. Currently at the [yProv4REP](https://github.com/HPCI-Lab/yProv4Rep) Repository
Example:
import yprov4ml
yprov4ml.start_run(
prov_user_namespace="www.example.org",
experiment_name="reproducible_example",
provenance_save_dir="prov",
save_after_n_logs=100,
collect_all_processes=True,
)
yprov4ml.log_source_code()
yprov4ml.log_execution_command()
def square(x):
return x**2
for i in range(1, 10):
yprov4ml.log_param(f"input_{i}", i, is_input_to="square")
o = square(i)
yprov4ml.log_param(f"output_{i}", o, is_output_to="square")
yprov4ml.end_run(create_graph=True, create_svg=True)