Interface ExperimentRunDetails.Builder

  • Method Details

    • experimentId

      ExperimentRunDetails.Builder experimentId(String experimentId)

      The ID of the experiment the run belongs to.

      Parameters:
      experimentId - The ID of the experiment the run belongs to.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • runId

      The ID of the run.

      Parameters:
      runId - The ID of the run.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • source

      Whether the run is reported by the caller's code or hosted by the service.

      Parameters:
      source - Whether the run is reported by the caller's code or hosted by the service.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • source

      Whether the run is reported by the caller's code or hosted by the service.

      Parameters:
      source - Whether the run is reported by the caller's code or hosted by the service.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      The status of the run.

      Parameters:
      status - The status of the run.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      The status of the run.

      Parameters:
      status - The status of the run.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • statusReason

      ExperimentRunDetails.Builder statusReason(String statusReason)

      Why the run did not finish. Present when status is DID_NOT_FINISH.

      Parameters:
      statusReason - Why the run did not finish. Present when status is DID_NOT_FINISH.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • statusReason

      Why the run did not finish. Present when status is DID_NOT_FINISH.

      Parameters:
      statusReason - Why the run did not finish. Present when status is DID_NOT_FINISH.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • statusDetail

      ExperimentRunDetails.Builder statusDetail(String statusDetail)

      Additional detail about the status: the StopExperimentRun detail, or for RUNNER_FAILED, the AgentCore error details as one string of up to 1,000 characters.

      Parameters:
      statusDetail - Additional detail about the status: the StopExperimentRun detail, or for RUNNER_FAILED, the AgentCore error details as one string of up to 1,000 characters.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • producer

      The producer that reports the run. Reported runs only.

      Parameters:
      producer - The producer that reports the run. Reported runs only.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • producer

      The producer that reports the run. Reported runs only.

      This is a convenience method that creates an instance of the ExperimentProducer.Builder avoiding the need to create one manually via ExperimentProducer.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to producer(ExperimentProducer).

      Parameters:
      producer - a consumer that will call methods on ExperimentProducer.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • producerPrincipal

      ExperimentRunDetails.Builder producerPrincipal(String producerPrincipal)

      The IAM principal that started the run, without the session name.

      Parameters:
      producerPrincipal - The IAM principal that started the run, without the session name.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • target

      The version of the experiment's target that the run tested, as given when the run was started or created.

      Parameters:
      target - The version of the experiment's target that the run tested, as given when the run was started or created.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • target

      The version of the experiment's target that the run tested, as given when the run was started or created.

      This is a convenience method that creates an instance of the TargetConfig.Builder avoiding the need to create one manually via TargetConfig.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to target(TargetConfig).

      Parameters:
      target - a consumer that will call methods on TargetConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • control

      What the run is compared against, as given.

      Parameters:
      control - What the run is compared against, as given.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • control

      What the run is compared against, as given.

      This is a convenience method that creates an instance of the ControlSource.Builder avoiding the need to create one manually via ControlSource.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to control(ControlSource).

      Parameters:
      control - a consumer that will call methods on ControlSource.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • controlRunId

      ExperimentRunDetails.Builder controlRunId(String controlRunId)

      The ID of the run this run is compared with, resolved when the run starts: either the live control run or the earlier run.

      Parameters:
      controlRunId - The ID of the run this run is compared with, resolved when the run starts: either the live control run or the earlier run.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • role

      The role of the run: TARGET, or CONTROL for a live control run.

      Parameters:
      role - The role of the run: TARGET, or CONTROL for a live control run.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • role

      The role of the run: TARGET, or CONTROL for a live control run.

      Parameters:
      role - The role of the run: TARGET, or CONTROL for a live control run.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • targetRunId

      ExperimentRunDetails.Builder targetRunId(String targetRunId)

      For a CONTROL run, the ID of the run it is the control for.

      Parameters:
      targetRunId - For a CONTROL run, the ID of the run it is the control for.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • dataset

      The dataset the run tested.

      Parameters:
      dataset - The dataset the run tested.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • dataset

      The dataset the run tested.

      This is a convenience method that creates an instance of the ExperimentRunDataset.Builder avoiding the need to create one manually via ExperimentRunDataset.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to dataset(ExperimentRunDataset).

      Parameters:
      dataset - a consumer that will call methods on ExperimentRunDataset.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • evaluators

      The evaluators the run is scored with, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs.

      Parameters:
      evaluators - The evaluators the run is scored with, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • evaluators

      The evaluators the run is scored with, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs.

      Parameters:
      evaluators - The evaluators the run is scored with, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • evaluators

      The evaluators the run is scored with, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs.

      This is a convenience method that creates an instance of the ExperimentEvaluator.Builder avoiding the need to create one manually via ExperimentEvaluator.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to evaluators(List<ExperimentEvaluator>).

      Parameters:
      evaluators - a consumer that will call methods on ExperimentEvaluator.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • rule

      The rule the run is checked against, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when the run has no rule, in which case the run has no verdict.

      Parameters:
      rule - The rule the run is checked against, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when the run has no rule, in which case the run has no verdict.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • rule

      The rule the run is checked against, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when the run has no rule, in which case the run has no verdict.

      This is a convenience method that creates an instance of the ExperimentRule.Builder avoiding the need to create one manually via ExperimentRule.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to rule(ExperimentRule).

      Parameters:
      rule - a consumer that will call methods on ExperimentRule.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • metadata

      Key-value facts about what the run tested, as given when the run was created.

      Parameters:
      metadata - Key-value facts about what the run tested, as given when the run was created.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • description

      ExperimentRunDetails.Builder description(String description)

      The description of the run, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when none was given.

      Parameters:
      description - The description of the run, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when none was given.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • traceStats

      Statistics from the agent's spans for the run, read after the run ended. Present once collection has started, which happens for a run that ends while its experiment has collectTraceStats enabled. Absent otherwise, including while the run is open.

      Parameters:
      traceStats - Statistics from the agent's spans for the run, read after the run ended. Present once collection has started, which happens for a run that ends while its experiment has collectTraceStats enabled. Absent otherwise, including while the run is open.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • traceStats

      Statistics from the agent's spans for the run, read after the run ended. Present once collection has started, which happens for a run that ends while its experiment has collectTraceStats enabled. Absent otherwise, including while the run is open.

      This is a convenience method that creates an instance of the RunTraceStats.Builder avoiding the need to create one manually via RunTraceStats.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to traceStats(RunTraceStats).

      Parameters:
      traceStats - a consumer that will call methods on RunTraceStats.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • batchEvaluation

      ExperimentRunDetails.Builder batchEvaluation(BatchEvaluationProgress batchEvaluation)

      The progress of the hosted run's batch evaluation. Hosted runs only.

      Parameters:
      batchEvaluation - The progress of the hosted run's batch evaluation. Hosted runs only.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • batchEvaluation

      default ExperimentRunDetails.Builder batchEvaluation(Consumer<BatchEvaluationProgress.Builder> batchEvaluation)

      The progress of the hosted run's batch evaluation. Hosted runs only.

      This is a convenience method that creates an instance of the BatchEvaluationProgress.Builder avoiding the need to create one manually via BatchEvaluationProgress.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to batchEvaluation(BatchEvaluationProgress).

      Parameters:
      batchEvaluation - a consumer that will call methods on BatchEvaluationProgress.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • summary

      Case counts and rates for the run. Updated live for reported runs; for hosted runs, filled in when the AgentCore batch evaluation finishes.

      Parameters:
      summary - Case counts and rates for the run. Updated live for reported runs; for hosted runs, filled in when the AgentCore batch evaluation finishes.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • summary

      Case counts and rates for the run. Updated live for reported runs; for hosted runs, filled in when the AgentCore batch evaluation finishes.

      This is a convenience method that creates an instance of the ExperimentCaseSummary.Builder avoiding the need to create one manually via ExperimentCaseSummary.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to summary(ExperimentCaseSummary).

      Parameters:
      summary - a consumer that will call methods on ExperimentCaseSummary.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • metrics

      Statistics for each of the run's evaluators.

      Parameters:
      metrics - Statistics for each of the run's evaluators.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • metrics

      Statistics for each of the run's evaluators.

      Parameters:
      metrics - Statistics for each of the run's evaluators.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • metrics

      Statistics for each of the run's evaluators.

      This is a convenience method that creates an instance of the EvaluatorMetric.Builder avoiding the need to create one manually via EvaluatorMetric.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to metrics(List<EvaluatorMetric>).

      Parameters:
      metrics - a consumer that will call methods on EvaluatorMetric.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • caseRecordsWritten

      ExperimentRunDetails.Builder caseRecordsWritten(Integer caseRecordsWritten)

      The number of case records written, across every attempt and revision.

      Parameters:
      caseRecordsWritten - The number of case records written, across every attempt and revision.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • verdict

      The verdict of the run. Present only for runs with a rule, once the run has ended.

      Parameters:
      verdict - The verdict of the run. Present only for runs with a rule, once the run has ended.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • verdict

      The verdict of the run. Present only for runs with a rule, once the run has ended.

      Parameters:
      verdict - The verdict of the run. Present only for runs with a rule, once the run has ended.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • verdictReasonCode

      ExperimentRunDetails.Builder verdictReasonCode(String verdictReasonCode)

      The reason for the run's verdict.

      Parameters:
      verdictReasonCode - The reason for the run's verdict.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • verdictReasonCode

      ExperimentRunDetails.Builder verdictReasonCode(VerdictReasonCode verdictReasonCode)

      The reason for the run's verdict.

      Parameters:
      verdictReasonCode - The reason for the run's verdict.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • verdictReason

      ExperimentRunDetails.Builder verdictReason(String verdictReason)

      A readable explanation of verdictReasonCode, such as "pass rate 82% (required 90%)".

      Parameters:
      verdictReason - A readable explanation of verdictReasonCode, such as "pass rate 82% (required 90%)".
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • checks

      The result of checking each of the rule's gates.

      Parameters:
      checks - The result of checking each of the rule's gates.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • checks

      The result of checking each of the rule's gates.

      Parameters:
      checks - The result of checking each of the rule's gates.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • checks

      The result of checking each of the rule's gates.

      This is a convenience method that creates an instance of the VerdictCheck.Builder avoiding the need to create one manually via VerdictCheck.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to checks(List<VerdictCheck>).

      Parameters:
      checks - a consumer that will call methods on VerdictCheck.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • createdAt

      ExperimentRunDetails.Builder createdAt(Instant createdAt)

      The time when the run was created.

      Parameters:
      createdAt - The time when the run was created.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • startedAt

      ExperimentRunDetails.Builder startedAt(Instant startedAt)

      The time when the run started. For reported runs, the declared run.startedAt, or createdAt if none was declared. For hosted runs, the time when the batch evaluation was created.

      Parameters:
      startedAt - The time when the run started. For reported runs, the declared run.startedAt, or createdAt if none was declared. For hosted runs, the time when the batch evaluation was created.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • completedAt

      ExperimentRunDetails.Builder completedAt(Instant completedAt)

      The time when the run ended.

      Parameters:
      completedAt - The time when the run ended.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • updatedAt

      ExperimentRunDetails.Builder updatedAt(Instant updatedAt)

      The time when the run was last updated.

      Parameters:
      updatedAt - The time when the run was last updated.
      Returns:
      Returns a reference to this object so that method calls can be chained together.