Package akka.javasdk.testkit.eval
Record Class ReportDocument
- Record Components:
format- always "akka-eval-report"formatVersion- 2; increments when a property changes meaning or is removedname- the name given withExperiment.name(java.lang.String), or the test method that ran the experimentstartedAt- when the run startedfinishedAt- when the last attempt was evaluatedruns- how many times every case rangate- the gate verdictsummary- the case and attempt counts and the pass rateevaluators- one entry per evaluator label, in the order the labels first appear in the attempts, counting every attemptspend- model calls, tokens and latency summed over the attempts whose evidence carries model callscases- one entry per case, in the order the cases were given, with its outcome over all runs and its requirementsattempts- one entry per attempt: every case in the order the cases were given, its runs ascending
public record ReportDocument(String format, int formatVersion, String name, Instant startedAt, Instant finishedAt, int runs, ReportDocument.Gate gate, ReportDocument.Summary summary, List<ReportDocument.EvaluatorCounts> evaluators, ReportDocument.Spend spend, List<ReportDocument.Case> cases, List<ReportDocument.Attempt> attempts)
extends Record
The report file as data: what
Experiment.run() writes to
target/eval-reports/<name>-<start time>.json, and what read(java.nio.file.Path) gives back. The file is
this record as JSON, in the akka-eval-report format described by
akka/javasdk/testkit/eval/eval-report.schema.json on the testkit classpath. A reader ignores
properties it does not know.
An attempt is one case in one run. Without Experiment.repeat(int) every case has one
attempt.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne case in one run.static final recordOne case over all its runs.static final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordOne requirement of a case over all runs.static final recordstatic final recordAll zero when no attempt carries model calls.static final recordstatic final record -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReportDocument(String format, int formatVersion, String name, Instant startedAt, Instant finishedAt, int runs, ReportDocument.Gate gate, ReportDocument.Summary summary, List<ReportDocument.EvaluatorCounts> evaluators, ReportDocument.Spend spend, List<ReportDocument.Case> cases, List<ReportDocument.Attempt> attempts) Creates an instance of aReportDocumentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionattempts()Returns the value of theattemptsrecord component.cases()Returns the value of thecasesrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevaluatorsrecord component.Returns the value of thefinishedAtrecord component.format()Returns the value of theformatrecord component.intReturns the value of theformatVersionrecord component.gate()Returns the value of thegaterecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.static ReportDocumentReads a report file written byExperiment.run().intruns()Returns the value of therunsrecord component.spend()Returns the value of thespendrecord component.Returns the value of thestartedAtrecord component.summary()Returns the value of thesummaryrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
FORMAT
- See Also:
-
FORMAT_VERSION
public static final int FORMAT_VERSION- See Also:
-
-
Constructor Details
-
ReportDocument
public ReportDocument(String format, int formatVersion, String name, Instant startedAt, Instant finishedAt, int runs, ReportDocument.Gate gate, ReportDocument.Summary summary, List<ReportDocument.EvaluatorCounts> evaluators, ReportDocument.Spend spend, List<ReportDocument.Case> cases, List<ReportDocument.Attempt> attempts) Creates an instance of aReportDocumentrecord class.- Parameters:
format- the value for theformatrecord componentformatVersion- the value for theformatVersionrecord componentname- the value for thenamerecord componentstartedAt- the value for thestartedAtrecord componentfinishedAt- the value for thefinishedAtrecord componentruns- the value for therunsrecord componentgate- the value for thegaterecord componentsummary- the value for thesummaryrecord componentevaluators- the value for theevaluatorsrecord componentspend- the value for thespendrecord componentcases- the value for thecasesrecord componentattempts- the value for theattemptsrecord component
-
-
Method Details
-
read
Reads a report file written byExperiment.run(). -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
format
Returns the value of theformatrecord component.- Returns:
- the value of the
formatrecord component
-
formatVersion
public int formatVersion()Returns the value of theformatVersionrecord component.- Returns:
- the value of the
formatVersionrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
startedAt
Returns the value of thestartedAtrecord component.- Returns:
- the value of the
startedAtrecord component
-
finishedAt
Returns the value of thefinishedAtrecord component.- Returns:
- the value of the
finishedAtrecord component
-
runs
public int runs()Returns the value of therunsrecord component.- Returns:
- the value of the
runsrecord component
-
gate
Returns the value of thegaterecord component.- Returns:
- the value of the
gaterecord component
-
summary
Returns the value of thesummaryrecord component.- Returns:
- the value of the
summaryrecord component
-
evaluators
Returns the value of theevaluatorsrecord component.- Returns:
- the value of the
evaluatorsrecord component
-
spend
Returns the value of thespendrecord component.- Returns:
- the value of the
spendrecord component
-
cases
Returns the value of thecasesrecord component.- Returns:
- the value of the
casesrecord component
-
attempts
Returns the value of theattemptsrecord component.- Returns:
- the value of the
attemptsrecord component
-