Package org.tribuo.interop
Class ExternalTrainerProvenance
java.lang.Object
org.tribuo.interop.ExternalTrainerProvenance
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance
,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>> TrainerProvenance
A dummy provenance for a model trained outside Tribuo.
It records the timestamp, hash and location of the loaded model.
If the model is already loaded into memory then the location is the current working directory and the timestamp is when this class is instantiated.
- See Also:
-
Field Summary
Fields inherited from interface com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance
CLASS_NAME, DEFAULT_HASH_TYPE
Fields inherited from interface org.tribuo.provenance.TrainerProvenance
IS_SEQUENCE, TRAIN_INVOCATION_COUNT, TRIBUO_VERSION_STRING
-
Constructor Summary
ConstructorDescriptionExternalTrainerProvenance
(byte[] model) Creates an external trainer provenance, computing the hash from the byte array and storing this instant as the timestamp, and the current working directory as the location.ExternalTrainerProvenance
(URL location) Creates an external trainer provenance, storing the location and pulling in the timestamp and file hash.ExternalTrainerProvenance
(Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> provenance) Used by the provenance serialization system. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance
iterator
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance
generateString
-
Constructor Details
-
ExternalTrainerProvenance
Creates an external trainer provenance, storing the location and pulling in the timestamp and file hash.- Parameters:
location
- The location to use.
-
ExternalTrainerProvenance
public ExternalTrainerProvenance(byte[] model) Creates an external trainer provenance, computing the hash from the byte array and storing this instant as the timestamp, and the current working directory as the location.- Parameters:
model
- The model as a byte array.
-
ExternalTrainerProvenance
public ExternalTrainerProvenance(Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> provenance) Used by the provenance serialization system.- Parameters:
provenance
- The provenance to reconstruct.
-
-
Method Details
-
getConfiguredParameters
- Specified by:
getConfiguredParameters
in interfacecom.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance
-
getClassName
- Specified by:
getClassName
in interfacecom.oracle.labs.mlrg.olcut.provenance.ObjectProvenance
-
toString
-
getInstanceValues
- Specified by:
getInstanceValues
in interfacecom.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance
-
equals
-
hashCode
public int hashCode()
-