Class ExternalTrainerProvenance

All Implemented Interfaces:,,, Serializable, Iterable<<String,>>, 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.
      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.
      model - The model as a byte array.
    • ExternalTrainerProvenance

      public ExternalTrainerProvenance(Map<String,> provenance)
      Used by the provenance serialization system.
      provenance - The provenance to reconstruct.
  • Method Details

    • getConfiguredParameters

      public Map<String,> getConfiguredParameters()
      Specified by:
      getConfiguredParameters in interface
    • getClassName

      public String getClassName()
      Specified by:
      getClassName in interface
    • toString

      public String toString()
      toString in class Object
    • getInstanceValues

      public Map<String,<?>> getInstanceValues()
      Specified by:
      getInstanceValues in interface
    • equals

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

      public int hashCode()
      hashCode in class Object