Class ModelProvenance
java.lang.Object
org.tribuo.provenance.ModelProvenance
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance,com.oracle.labs.mlrg.olcut.provenance.Provenance,Serializable,Iterable<com.oracle.labs.mlrg.olcut.util.Pair<String, com.oracle.labs.mlrg.olcut.provenance.Provenance>>
- Direct Known Subclasses:
EnsembleModelProvenance
public class ModelProvenance
extends Object
implements com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance
Contains provenance information for an instance of a
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.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringThe name of the architecture name field.protected final StringThe system CPU architecture string.protected final StringThe name of the host class.protected static final StringThe name of the dataset provenance field.protected final DatasetProvenanceThe dataset provenance.protected static final StringThe name of the instance values field.protected final com.oracle.labs.mlrg.olcut.provenance.MapProvenance<? extends com.oracle.labs.mlrg.olcut.provenance.Provenance> Any instance time information supplied by the users.protected static final StringThe name of the Java version field.protected final StringThe Java version string.protected static final StringThe name of the OS name field.protected final StringThe OS string.protected final OffsetDateTimeThe time the model was created.protected static final StringThe name of the trainer provenance field.protected final TrainerProvenanceProvenance of the trainer which created this model.protected static final StringThe name of the training time field.protected static final StringThe name of the Tribuo version string field.protected static final StringThe value returned for models from Tribuo 4.1 and earlier which don't record the Java, OS or architecture.protected final StringThe Tribuo version string.Fields inherited from interface com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance
CLASS_NAME, DEFAULT_HASH_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionModelProvenance(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.ModelProvenance(Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> map) Used by the provenance unmarshalling system. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetArch()The CPU architecture used to create this model.The training dataset provenance.com.oracle.labs.mlrg.olcut.provenance.MapProvenance<? extends com.oracle.labs.mlrg.olcut.provenance.Provenance> Provenance for the specific training run which created this model.The Java version used to create this model.getOS()The name of the OS used to create this model.The trainer provenance.The training timestamp.The Tribuo version used to create this model.inthashCode()protected List<com.oracle.labs.mlrg.olcut.util.Pair<String, com.oracle.labs.mlrg.olcut.provenance.Provenance>> 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()CallsinternalProvenances()and returns the iterator from that list.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance
generateString
-
Field Details
-
DATASET
-
TRAINER
-
TRAINING_TIME
-
INSTANCE_VALUES
-
TRIBUO_VERSION_STRING
The name of the Tribuo version string field.- See Also:
-
JAVA_VERSION_STRING
-
OS_STRING
-
ARCH_STRING
-
UNKNOWN_VERSION
The value returned for models from Tribuo 4.1 and earlier which don't record the Java, OS or architecture.- See Also:
-
className
The name of the host class. -
time
The time the model was created. -
datasetProvenance
The dataset provenance. -
trainerProvenance
Provenance of the trainer which created this model. -
instanceProvenance
protected final com.oracle.labs.mlrg.olcut.provenance.MapProvenance<? extends com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenanceAny instance time information supplied by the users. -
versionString
The Tribuo version string. -
javaVersionString
The Java version string. -
osString
The OS string. -
archString
The system CPU architecture string.
-
-
Constructor Details
-
ModelProvenance
public ModelProvenance(String className, OffsetDateTime time, DatasetProvenance datasetProvenance, TrainerProvenance trainerProvenance) Creates a model provenance tracking the class name, creation time, dataset provenance and trainer provenance.Also tracks system details like the os name, os architecture, java version, and Tribuo version.
- Parameters:
className- The model class name.time- The model creation time.datasetProvenance- The dataset provenance.trainerProvenance- The trainer provenance.
-
ModelProvenance
public 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.Also tracks system details like the os name, os architecture, java version, and Tribuo version.
- Parameters:
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.
-
ModelProvenance
public 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.Also optionally tracks system details like the os name, os architecture, java version, and Tribuo version.
- Parameters:
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.
-
ModelProvenance
-
-
Method Details
-
getTrainingTime
-
getDatasetProvenance
The training dataset provenance.- Returns:
- The training dataset provenance.
-
getTrainerProvenance
The trainer provenance.- Returns:
- The trainer provenance.
-
getInstanceProvenance
public 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.- Returns:
- The instance provenance.
-
getTribuoVersion
The Tribuo version used to create this model.- Returns:
- The Tribuo version.
-
getJavaVersion
The Java version used to create this model.- Returns:
- The Java version.
-
getOS
-
getArch
The CPU architecture used to create this model.- Returns:
- The CPU architecture.
-
toString
-
getClassName
- Specified by:
getClassNamein interfacecom.oracle.labs.mlrg.olcut.provenance.ObjectProvenance
-
equals
-
hashCode
-
internalProvenances
-
iterator
public Iterator<com.oracle.labs.mlrg.olcut.util.Pair<String, com.oracle.labs.mlrg.olcut.provenance.Provenance>> iterator()CallsinternalProvenances()and returns the iterator from that list.
-