public class ModelProvenance extends Object implements com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance
Model
.
Made up of the class name of the model object, the date and time it was trained, the provenance of the training data, and the provenance of the trainer.
In addition by default it collects the Java version, OS name and system architecture, along with the running Tribuo version.
Modifier and Type | Field and Description |
---|---|
protected static String |
ARCH_STRING |
protected String |
archString |
protected String |
className |
protected static String |
DATASET |
protected DatasetProvenance |
datasetProvenance |
protected static String |
INSTANCE_VALUES |
protected com.oracle.labs.mlrg.olcut.provenance.MapProvenance<? extends com.oracle.labs.mlrg.olcut.provenance.Provenance> |
instanceProvenance |
protected static String |
JAVA_VERSION_STRING |
protected String |
javaVersionString |
protected static String |
OS_STRING |
protected String |
osString |
protected OffsetDateTime |
time |
protected static String |
TRAINER |
protected TrainerProvenance |
trainerProvenance |
protected static String |
TRAINING_TIME |
protected static String |
TRIBUO_VERSION_STRING |
protected static String |
UNKNOWN_VERSION |
protected String |
versionString |
Constructor and Description |
---|
ModelProvenance(Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> map)
Used by the provenance unmarshalling system.
|
ModelProvenance(String className,
OffsetDateTime time,
DatasetProvenance datasetProvenance,
TrainerProvenance trainerProvenance)
Creates a model provenance tracking the class name, creation time, dataset provenance and trainer provenance.
|
ModelProvenance(String className,
OffsetDateTime time,
DatasetProvenance datasetProvenance,
TrainerProvenance trainerProvenance,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance)
Creates a model provenance tracking the class name, creation time, dataset provenance,
trainer provenance and any instance specific provenance.
|
ModelProvenance(String className,
OffsetDateTime time,
DatasetProvenance datasetProvenance,
TrainerProvenance trainerProvenance,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance,
boolean trackSystem)
Creates a model provenance tracking the class name, creation time, dataset provenance,
trainer provenance and any instance specific provenance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getArch()
The CPU architecture used to create this model.
|
String |
getClassName() |
DatasetProvenance |
getDatasetProvenance()
The training dataset provenance.
|
com.oracle.labs.mlrg.olcut.provenance.MapProvenance<? extends com.oracle.labs.mlrg.olcut.provenance.Provenance> |
getInstanceProvenance()
Provenance for the specific training run which created this model.
|
String |
getJavaVersion()
The Java version used to create this model.
|
String |
getOS()
The name of the OS used to create this model.
|
TrainerProvenance |
getTrainerProvenance()
The trainer provenance.
|
OffsetDateTime |
getTrainingTime()
The training timestamp.
|
String |
getTribuoVersion()
The Tribuo version used to create this dataset.
|
int |
hashCode() |
protected List<com.oracle.labs.mlrg.olcut.util.Pair<String,com.oracle.labs.mlrg.olcut.provenance.Provenance>> |
internalProvenances()
Returns a list of all the provenances in this model provenance so subclasses
can append to the list.
|
Iterator<com.oracle.labs.mlrg.olcut.util.Pair<String,com.oracle.labs.mlrg.olcut.provenance.Provenance>> |
iterator()
Calls
internalProvenances() and returns the iterator from that list. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
checkAndExtractProvenance, generateString, maybeExtractProvenance
forEach, spliterator
protected static final String DATASET
protected static final String TRAINER
protected static final String TRAINING_TIME
protected static final String INSTANCE_VALUES
protected static final String TRIBUO_VERSION_STRING
protected static final String JAVA_VERSION_STRING
protected static final String OS_STRING
protected static final String ARCH_STRING
protected static final String UNKNOWN_VERSION
protected final String className
protected final OffsetDateTime time
protected final DatasetProvenance datasetProvenance
protected final TrainerProvenance trainerProvenance
protected final com.oracle.labs.mlrg.olcut.provenance.MapProvenance<? extends com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance
protected final String versionString
protected final String javaVersionString
protected final String osString
protected final String archString
public ModelProvenance(String className, OffsetDateTime time, DatasetProvenance datasetProvenance, TrainerProvenance trainerProvenance)
Also tracks system details like the os name, os architecture, java version, and Tribuo version.
className
- The model class name.time
- The model creation time.datasetProvenance
- The dataset provenance.trainerProvenance
- The trainer provenance.public ModelProvenance(String className, OffsetDateTime time, DatasetProvenance datasetProvenance, TrainerProvenance trainerProvenance, Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance)
Also tracks system details like the os name, os architecture, java version, and Tribuo version.
className
- The model class name.time
- The model creation time.datasetProvenance
- The dataset provenance.trainerProvenance
- The trainer provenance.instanceProvenance
- Provenance for this specific model training run.public ModelProvenance(String className, OffsetDateTime time, DatasetProvenance datasetProvenance, TrainerProvenance trainerProvenance, Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance, boolean trackSystem)
Also optionally tracks system details like the os name, os architecture, java version, and Tribuo version.
className
- The model class name.time
- The model creation time.datasetProvenance
- The dataset provenance.trainerProvenance
- The trainer provenance.instanceProvenance
- Provenance for this specific model training run.trackSystem
- If true then store the java version, os name and os arch in the provenance.public OffsetDateTime getTrainingTime()
public DatasetProvenance getDatasetProvenance()
public TrainerProvenance getTrainerProvenance()
public com.oracle.labs.mlrg.olcut.provenance.MapProvenance<? extends com.oracle.labs.mlrg.olcut.provenance.Provenance> getInstanceProvenance()
public String getTribuoVersion()
public String getJavaVersion()
public String getOS()
public String getArch()
public String getClassName()
getClassName
in interface com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance
protected List<com.oracle.labs.mlrg.olcut.util.Pair<String,com.oracle.labs.mlrg.olcut.provenance.Provenance>> internalProvenances()
public Iterator<com.oracle.labs.mlrg.olcut.util.Pair<String,com.oracle.labs.mlrg.olcut.provenance.Provenance>> iterator()
internalProvenances()
and returns the iterator from that list.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.