Package com.tnsai.evaluation.model
Record Class Baseline
java.lang.Object
java.lang.Record
com.tnsai.evaluation.model.Baseline
public record Baseline(String datasetName, String runId, Instant timestamp, Map<String,Double> scores, Map<String,Object> metadata)
extends Record
A saved baseline from a benchmark run, used for regression detection.
- Since:
- 0.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedatasetNamerecord component.final booleanIndicates whether some other object is "equal to" this one.static BaselinefromBenchmarkResult(BenchmarkResult result) final inthashCode()Returns a hash code value for this object.static Baselinemetadata()Returns the value of themetadatarecord component.runId()Returns the value of therunIdrecord component.voidscores()Returns the value of thescoresrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Baseline
public Baseline(String datasetName, String runId, Instant timestamp, Map<String, Double> scores, Map<String, Object> metadata) Creates an instance of aBaselinerecord class.- Parameters:
datasetName- the value for thedatasetNamerecord componentrunId- the value for therunIdrecord componenttimestamp- the value for thetimestamprecord componentscores- the value for thescoresrecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
fromBenchmarkResult
-
saveTo
- Throws:
IOException
-
loadFrom
- Throws:
IOException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
datasetName
Returns the value of thedatasetNamerecord component.- Returns:
- the value of the
datasetNamerecord component
-
runId
Returns the value of therunIdrecord component.- Returns:
- the value of the
runIdrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
scores
Returns the value of thescoresrecord component.- Returns:
- the value of the
scoresrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-