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

public final class ExternalTrainerProvenance extends Object implements 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:
  • Constructor Details

    • ExternalTrainerProvenance

      public ExternalTrainerProvenance(URL location)
      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

      public Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> getConfiguredParameters()
      Specified by:
      getConfiguredParameters in interface com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance
    • getClassName

      public String getClassName()
      Specified by:
      getClassName in interface com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getInstanceValues

      public Map<String,com.oracle.labs.mlrg.olcut.provenance.PrimitiveProvenance<?>> getInstanceValues()
      Specified by:
      getInstanceValues in interface com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object