retab 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/retab/base_client.rb +1 -5
- data/lib/retab/classifications.rb +1 -1
- data/lib/retab/edit_templates.rb +1 -1
- data/lib/retab/edits.rb +1 -1
- data/lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb +3 -3
- data/lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb +3 -3
- data/lib/retab/experiment_run_metrics/metrics_stale_error_last_run.rb +3 -3
- data/lib/retab/experiment_run_results/error_workflow_experiment_result.rb +1 -22
- data/lib/retab/experiment_runs/create_experiment_run_request.rb +5 -2
- data/lib/retab/experiment_runs/error_workflow_experiment_run.rb +1 -1
- data/lib/retab/experiment_runs/experiment_run.rb +3 -3
- data/lib/retab/experiment_runs.rb +4 -1
- data/lib/retab/extractions/extraction.rb +0 -3
- data/lib/retab/extractions/extraction_request.rb +0 -3
- data/lib/retab/extractions.rb +53 -4
- data/lib/retab/files/create_file_blueprint_request.rb +3 -3
- data/lib/retab/files/file_blueprint.rb +5 -5
- data/lib/retab/files.rb +3 -3
- data/lib/retab/mime.rb +77 -6
- data/lib/retab/parses/parse.rb +0 -3
- data/lib/retab/parses/parse_request.rb +0 -3
- data/lib/retab/parses.rb +1 -4
- data/lib/retab/partitions.rb +1 -1
- data/lib/retab/schemas/generate_schema_request.rb +0 -3
- data/lib/retab/schemas.rb +1 -4
- data/lib/retab/splits.rb +1 -1
- data/lib/retab/types/{workflow_test_run_results_order.rb → eval_run_freshness_reasons.rb} +1 -1
- data/lib/retab/types/eval_run_freshness_status.rb +9 -0
- data/lib/retab/types/eval_run_trigger_type.rb +18 -0
- data/lib/retab/types/{latest_block_test_run_summary_outcome.rb → latest_block_eval_run_summary_outcome.rb} +1 -1
- data/lib/retab/types/{latest_block_test_run_summary_status.rb → latest_block_eval_run_summary_status.rb} +1 -1
- data/lib/retab/types/trigger_info_type.rb +1 -10
- data/lib/retab/types/{workflow_test_runs_order.rb → workflow_eval_result_verdict.rb} +1 -1
- data/lib/retab/types/workflow_eval_run_results_order.rb +9 -0
- data/lib/retab/types/{workflow_test_result_verdict.rb → workflow_eval_runs_order.rb} +1 -1
- data/lib/retab/types/workflow_eval_schema_drift.rb +9 -0
- data/lib/retab/types/{workflow_tests_order.rb → workflow_evals_order.rb} +1 -1
- data/lib/retab/types/workflow_experiment_freshness_state.rb +9 -0
- data/lib/retab/types/workflow_experiment_run_plan_mode.rb +15 -0
- data/lib/retab/types/workflow_experiments_exclude_status.rb +1 -1
- data/lib/retab/types/workflow_experiments_status.rb +1 -1
- data/lib/retab/version.rb +1 -1
- data/lib/retab/workflow_artifacts/extraction_workflow_artifact.rb +0 -3
- data/lib/retab/workflow_artifacts/parse_workflow_artifact.rb +0 -3
- data/lib/retab/workflow_artifacts/workflow_artifact.rb +5 -2
- data/lib/retab/workflow_block_executions/stored_block_execution.rb +3 -3
- data/lib/retab/workflow_edges.rb +6 -0
- data/lib/retab/{workflow_test_run_results/cancelled_workflow_test_run.rb → workflow_eval_run_results/cancelled_workflow_eval_run.rb} +1 -1
- data/lib/retab/{workflow_test_run_results/completed_workflow_test_run.rb → workflow_eval_run_results/completed_workflow_eval_run.rb} +1 -1
- data/lib/retab/workflow_eval_run_results/error_workflow_eval_run.rb +28 -0
- data/lib/retab/workflow_eval_run_results/pending_workflow_eval_run.rb +7 -0
- data/lib/retab/{workflow_test_run_results/error_workflow_test_run.rb → workflow_eval_run_results/queued_workflow_eval_run.rb} +1 -1
- data/lib/retab/{workflow_test_run_results/workflow_test_run_timing.rb → workflow_eval_run_results/result_file_ref.rb} +1 -1
- data/lib/retab/workflow_eval_run_results/running_workflow_eval_run.rb +7 -0
- data/lib/retab/{workflow_test_run_results/workflow_test_result.rb → workflow_eval_run_results/workflow_eval_result.rb} +17 -17
- data/lib/retab/workflow_eval_run_results/workflow_eval_run_timing.rb +7 -0
- data/lib/retab/{workflow_test_run_results.rb → workflow_eval_run_results.rb} +10 -10
- data/lib/retab/{workflow_test_runs/block_test_batch_execution_counts.rb → workflow_eval_runs/block_eval_batch_execution_counts.rb} +3 -3
- data/lib/retab/{workflow_test_runs/block_test_lifecycle_counts.rb → workflow_eval_runs/block_eval_lifecycle_counts.rb} +1 -1
- data/lib/retab/{workflow_test_runs/block_test_outcome_counts.rb → workflow_eval_runs/block_eval_outcome_counts.rb} +1 -1
- data/lib/retab/{workflow_test_runs/create_workflow_test_run_request.rb → workflow_eval_runs/create_workflow_eval_run_request.rb} +4 -4
- data/lib/retab/{workflow_tests/workflow_test_block_target.rb → workflow_eval_runs/eval_run_block_target.rb} +1 -1
- data/lib/retab/workflow_eval_runs/eval_run_freshness.rb +34 -0
- data/lib/retab/{workflow_test_runs/workflow_test_run_workflow_scope.rb → workflow_eval_runs/eval_run_trigger.rb} +1 -1
- data/lib/retab/{workflow_test_runs/workflow_test_run.rb → workflow_eval_runs/workflow_eval_run.rb} +18 -18
- data/lib/retab/{workflow_test_runs/workflow_test_run_block_scope.rb → workflow_eval_runs/workflow_eval_run_block_scope.rb} +1 -1
- data/lib/retab/{workflow_test_runs/workflow_test_run_single_scope.rb → workflow_eval_runs/workflow_eval_run_single_scope.rb} +4 -4
- data/lib/retab/workflow_eval_runs/workflow_eval_run_workflow_scope.rb +20 -0
- data/lib/retab/{workflow_test_runs.rb → workflow_eval_runs.rb} +24 -24
- data/lib/retab/{workflow_tests/create_workflow_test_request.rb → workflow_evals/create_workflow_eval_request.rb} +4 -4
- data/lib/retab/workflow_evals/eval_file_handle_input.rb +7 -0
- data/lib/retab/workflow_evals/eval_json_handle_input.rb +7 -0
- data/lib/retab/workflow_evals/eval_public_file_ref.rb +7 -0
- data/lib/retab/{workflow_tests/latest_block_test_run_summary.rb → workflow_evals/latest_block_eval_run_summary.rb} +4 -4
- data/lib/retab/{workflow_tests/manual_workflow_test_source.rb → workflow_evals/manual_workflow_eval_source.rb} +1 -1
- data/lib/retab/{workflow_tests/run_step_workflow_test_source.rb → workflow_evals/run_step_workflow_eval_source.rb} +1 -1
- data/lib/retab/{workflow_tests/update_workflow_test_request.rb → workflow_evals/update_workflow_eval_request.rb} +3 -3
- data/lib/retab/{workflow_tests/workflow_test.rb → workflow_evals/workflow_eval.rb} +7 -7
- data/lib/retab/workflow_evals/workflow_eval_block_target.rb +7 -0
- data/lib/retab/{workflow_tests.rb → workflow_evals.rb} +31 -31
- data/lib/retab/workflow_experiments/workflow_experiment.rb +12 -0
- data/lib/retab/workflow_runs.rb +1 -1
- data/lib/retab/workflows.rb +2 -2
- data/lib/retab.rb +3 -3
- data/rbi/retab/{block_test_batch_execution_counts.rbi → block_eval_batch_execution_counts.rbi} +5 -5
- data/rbi/retab/{block_test_lifecycle_counts.rbi → block_eval_lifecycle_counts.rbi} +1 -1
- data/rbi/retab/{block_test_outcome_counts.rbi → block_eval_outcome_counts.rbi} +1 -1
- data/rbi/retab/{cancelled_workflow_test_run.rbi → cancelled_workflow_eval_run.rbi} +1 -1
- data/rbi/retab/classification_request.rbi +2 -2
- data/rbi/retab/{completed_workflow_test_run.rbi → completed_workflow_eval_run.rbi} +1 -1
- data/rbi/retab/create_experiment_run_request.rbi +6 -0
- data/rbi/retab/create_file_blueprint_request.rbi +4 -4
- data/rbi/retab/{create_workflow_test_request.rbi → create_workflow_eval_request.rbi} +5 -5
- data/rbi/retab/{create_workflow_test_run_request.rbi → create_workflow_eval_run_request.rbi} +3 -3
- data/rbi/retab/create_workflow_run_request.rbi +2 -2
- data/rbi/retab/edit_request.rbi +2 -2
- data/rbi/retab/{error_workflow_test_run.rbi → error_workflow_eval_run.rbi} +1 -1
- data/rbi/retab/eval_file_handle_input.rbi +30 -0
- data/rbi/retab/eval_json_handle_input.rbi +30 -0
- data/rbi/retab/eval_public_file_ref.rbi +36 -0
- data/rbi/retab/{workflow_test_block_target.rbi → eval_run_block_target.rbi} +1 -1
- data/rbi/retab/eval_run_freshness.rbi +48 -0
- data/rbi/retab/{workflow_test_run_workflow_scope.rbi → eval_run_trigger.rbi} +1 -1
- data/rbi/retab/experiment_metrics_stale_error.rbi +2 -2
- data/rbi/retab/experiment_run.rbi +2 -2
- data/rbi/retab/experiment_runs.rbi +2 -1
- data/rbi/retab/experiment_summary_metrics_response.rbi +2 -2
- data/rbi/retab/extraction.rbi +0 -6
- data/rbi/retab/extraction_request.rbi +2 -8
- data/rbi/retab/extraction_workflow_artifact.rbi +0 -6
- data/rbi/retab/extractions.rbi +19 -2
- data/rbi/retab/file_blueprint.rbi +6 -6
- data/rbi/retab/file_handle_input.rbi +2 -2
- data/rbi/retab/files.rbi +2 -2
- data/rbi/retab/generate_schema_request.rbi +0 -6
- data/rbi/retab/{latest_block_test_run_summary.rbi → latest_block_eval_run_summary.rbi} +3 -3
- data/rbi/retab/{manual_workflow_test_source.rbi → manual_workflow_eval_source.rbi} +3 -3
- data/rbi/retab/metrics_stale_error_last_run.rbi +2 -2
- data/rbi/retab/parse.rbi +0 -6
- data/rbi/retab/parse_request.rbi +2 -8
- data/rbi/retab/parse_workflow_artifact.rbi +0 -6
- data/rbi/retab/parses.rbi +1 -2
- data/rbi/retab/partition_request.rbi +2 -2
- data/rbi/retab/{pending_workflow_test_run.rbi → pending_workflow_eval_run.rbi} +1 -1
- data/rbi/retab/{queued_workflow_test_run.rbi → queued_workflow_eval_run.rbi} +1 -1
- data/rbi/retab/result_file_ref.rbi +36 -0
- data/rbi/retab/{run_step_workflow_test_source.rbi → run_step_workflow_eval_source.rbi} +1 -1
- data/rbi/retab/{running_workflow_test_run.rbi → running_workflow_eval_run.rbi} +1 -1
- data/rbi/retab/schemas.rbi +1 -2
- data/rbi/retab/split_request.rbi +2 -2
- data/rbi/retab/stored_block_execution.rbi +2 -2
- data/rbi/retab/{update_workflow_test_request.rbi → update_workflow_eval_request.rbi} +3 -3
- data/rbi/retab/workflow_artifact.rbi +6 -0
- data/rbi/retab/workflow_edges.rbi +2 -1
- data/rbi/retab/{workflow_test.rbi → workflow_eval.rbi} +11 -11
- data/rbi/retab/workflow_eval_block_target.rbi +30 -0
- data/rbi/retab/{workflow_test_result.rbi → workflow_eval_result.rbi} +11 -11
- data/rbi/retab/workflow_eval_run.rbi +84 -0
- data/rbi/retab/{workflow_test_run_block_scope.rbi → workflow_eval_run_block_scope.rbi} +1 -1
- data/rbi/retab/{workflow_test_run_results.rbi → workflow_eval_run_results.rbi} +3 -3
- data/rbi/retab/{workflow_test_run_single_scope.rbi → workflow_eval_run_single_scope.rbi} +3 -3
- data/rbi/retab/{workflow_test_run_timing.rbi → workflow_eval_run_timing.rbi} +1 -1
- data/rbi/retab/workflow_eval_run_workflow_scope.rbi +24 -0
- data/rbi/retab/{workflow_test_runs.rbi → workflow_eval_runs.rbi} +8 -8
- data/rbi/retab/{workflow_tests.rbi → workflow_evals.rbi} +16 -16
- data/rbi/retab/workflow_experiment.rbi +24 -0
- data/rbi/retab/workflows.rbi +2 -2
- metadata +111 -92
- data/lib/retab/types/workflow_test_schema_drift.rb +0 -9
- data/lib/retab/workflow_test_run_results/pending_workflow_test_run.rb +0 -7
- data/lib/retab/workflow_test_run_results/queued_workflow_test_run.rb +0 -7
- data/lib/retab/workflow_test_run_results/running_workflow_test_run.rb +0 -7
- data/rbi/retab/workflow_test_run.rbi +0 -84
- /data/lib/retab/{workflow_test_run_results → workflow_eval_run_results}/assertion_failure.rb +0 -0
- /data/lib/retab/{workflow_test_run_results → workflow_eval_run_results}/assertion_result.rb +0 -0
- /data/lib/retab/{workflow_experiments → workflow_eval_run_results}/file_handle_input.rb +0 -0
- /data/lib/retab/{workflow_experiments → workflow_eval_run_results}/json_handle_input.rb +0 -0
- /data/lib/retab/{workflow_test_run_results → workflow_eval_run_results}/verdict_summary.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/all_items_match_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/any_item_matches_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/array_contains_condition.rb +0 -0
- /data/lib/retab/{workflow_experiments → workflow_evals}/artifact_drift.rb +0 -0
- /data/lib/retab/{workflow_experiments → workflow_evals}/artifact_freshness.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/assertion_schema_dep.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/assertion_spec.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/between_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/contain_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/ends_with_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/equal_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/exist_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/json_schema_valid_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/length_compare_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/llm_judged_as_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/llm_not_judged_as_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/matche_regex_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/not_contains_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/not_equals_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/not_exists_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/number_compare_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/object_contains_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/output_target.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/similarity_gte_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/split_iou_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/start_with_condition.rb +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module Retab
|
|
6
|
-
class
|
|
6
|
+
class BlockEvalBatchExecutionCounts < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
lifecycle_counts: :lifecycle_counts,
|
|
@@ -18,8 +18,8 @@ module Retab
|
|
|
18
18
|
def initialize(json)
|
|
19
19
|
super()
|
|
20
20
|
hash = self.class.normalize(json)
|
|
21
|
-
@lifecycle_counts = hash[:lifecycle_counts] ? Retab::
|
|
22
|
-
@outcome = hash[:outcome] ? Retab::
|
|
21
|
+
@lifecycle_counts = hash[:lifecycle_counts] ? Retab::BlockEvalLifecycleCounts.new(hash[:lifecycle_counts]) : nil
|
|
22
|
+
@outcome = hash[:outcome] ? Retab::BlockEvalOutcomeCounts.new(hash[:outcome]) : nil
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module Retab
|
|
6
|
-
class
|
|
6
|
+
class CreateWorkflowEvalRunRequest < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
workflow_id: :workflow_id,
|
|
@@ -22,11 +22,11 @@ module Retab
|
|
|
22
22
|
@scope = hash[:scope] ? (
|
|
23
23
|
case hash[:scope][:type]
|
|
24
24
|
when "block"
|
|
25
|
-
Retab::
|
|
25
|
+
Retab::WorkflowEvalRunBlockScope.new(hash[:scope])
|
|
26
26
|
when "single"
|
|
27
|
-
Retab::
|
|
27
|
+
Retab::WorkflowEvalRunSingleScope.new(hash[:scope])
|
|
28
28
|
when "workflow"
|
|
29
|
-
Retab::
|
|
29
|
+
Retab::WorkflowEvalRunWorkflowScope.new(hash[:scope])
|
|
30
30
|
else
|
|
31
31
|
hash[:scope]
|
|
32
32
|
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module Retab
|
|
6
|
+
class EvalRunFreshness < Retab::Types::BaseModel
|
|
7
|
+
|
|
8
|
+
HASH_ATTRS = {
|
|
9
|
+
status: :status,
|
|
10
|
+
reasons: :reasons,
|
|
11
|
+
validity_fingerprint: :validity_fingerprint,
|
|
12
|
+
input_fingerprint: :input_fingerprint,
|
|
13
|
+
baseline_run_id: :baseline_run_id
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor(
|
|
17
|
+
:status,
|
|
18
|
+
:reasons,
|
|
19
|
+
:validity_fingerprint,
|
|
20
|
+
:input_fingerprint,
|
|
21
|
+
:baseline_run_id
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
super()
|
|
26
|
+
hash = self.class.normalize(json)
|
|
27
|
+
@status = hash[:status].nil? ? "unknown" : hash[:status]
|
|
28
|
+
@reasons = (hash[:reasons] || [])
|
|
29
|
+
@validity_fingerprint = hash[:validity_fingerprint]
|
|
30
|
+
@input_fingerprint = hash[:input_fingerprint]
|
|
31
|
+
@baseline_run_id = hash[:baseline_run_id]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
data/lib/retab/{workflow_test_runs/workflow_test_run.rb → workflow_eval_runs/workflow_eval_run.rb}
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module Retab
|
|
6
|
-
class
|
|
6
|
+
class WorkflowEvalRun < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
id: :id,
|
|
@@ -13,8 +13,8 @@ module Retab
|
|
|
13
13
|
lifecycle: :lifecycle,
|
|
14
14
|
timing: :timing,
|
|
15
15
|
target: :target,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
eval_id: :eval_id,
|
|
17
|
+
total_evals: :total_evals,
|
|
18
18
|
counts: :counts,
|
|
19
19
|
freshness: :freshness
|
|
20
20
|
}.freeze
|
|
@@ -27,8 +27,8 @@ module Retab
|
|
|
27
27
|
:lifecycle,
|
|
28
28
|
:timing,
|
|
29
29
|
:target,
|
|
30
|
-
:
|
|
31
|
-
:
|
|
30
|
+
:eval_id,
|
|
31
|
+
:total_evals,
|
|
32
32
|
:counts,
|
|
33
33
|
:freshness
|
|
34
34
|
)
|
|
@@ -39,31 +39,31 @@ module Retab
|
|
|
39
39
|
@id = hash[:id]
|
|
40
40
|
@workflow_id = hash[:workflow_id]
|
|
41
41
|
@workflow_version_id = hash[:workflow_version_id]
|
|
42
|
-
@trigger = hash[:trigger] ? Retab::
|
|
42
|
+
@trigger = hash[:trigger] ? Retab::EvalRunTrigger.new(hash[:trigger]) : nil
|
|
43
43
|
@lifecycle = hash[:lifecycle] ? (
|
|
44
44
|
case hash[:lifecycle][:status]
|
|
45
45
|
when "cancelled"
|
|
46
|
-
Retab::
|
|
46
|
+
Retab::CancelledWorkflowEvalRun.new(hash[:lifecycle])
|
|
47
47
|
when "completed"
|
|
48
|
-
Retab::
|
|
48
|
+
Retab::CompletedWorkflowEvalRun.new(hash[:lifecycle])
|
|
49
49
|
when "error"
|
|
50
|
-
Retab::
|
|
50
|
+
Retab::ErrorWorkflowEvalRun.new(hash[:lifecycle])
|
|
51
51
|
when "pending"
|
|
52
|
-
Retab::
|
|
52
|
+
Retab::PendingWorkflowEvalRun.new(hash[:lifecycle])
|
|
53
53
|
when "queued"
|
|
54
|
-
Retab::
|
|
54
|
+
Retab::QueuedWorkflowEvalRun.new(hash[:lifecycle])
|
|
55
55
|
when "running"
|
|
56
|
-
Retab::
|
|
56
|
+
Retab::RunningWorkflowEvalRun.new(hash[:lifecycle])
|
|
57
57
|
else
|
|
58
58
|
hash[:lifecycle]
|
|
59
59
|
end
|
|
60
60
|
) : nil
|
|
61
|
-
@timing = hash[:timing] ? Retab::
|
|
62
|
-
@target = hash[:target] ? Retab::
|
|
63
|
-
@
|
|
64
|
-
@
|
|
65
|
-
@counts = hash[:counts] ? Retab::
|
|
66
|
-
@freshness = hash[:freshness] ? Retab::
|
|
61
|
+
@timing = hash[:timing] ? Retab::WorkflowEvalRunTiming.new(hash[:timing]) : nil
|
|
62
|
+
@target = hash[:target] ? Retab::EvalRunBlockTarget.new(hash[:target]) : nil
|
|
63
|
+
@eval_id = hash[:eval_id]
|
|
64
|
+
@total_evals = hash[:total_evals]
|
|
65
|
+
@counts = hash[:counts] ? Retab::BlockEvalBatchExecutionCounts.new(hash[:counts]) : nil
|
|
66
|
+
@freshness = hash[:freshness] ? Retab::EvalRunFreshness.new(hash[:freshness]) : nil
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
end
|
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module Retab
|
|
6
|
-
class
|
|
6
|
+
class WorkflowEvalRunSingleScope < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
type: :type,
|
|
10
|
-
|
|
10
|
+
eval_id: :eval_id
|
|
11
11
|
}.freeze
|
|
12
12
|
|
|
13
13
|
attr_accessor(
|
|
14
14
|
:type,
|
|
15
|
-
:
|
|
15
|
+
:eval_id
|
|
16
16
|
)
|
|
17
17
|
|
|
18
18
|
def initialize(json)
|
|
19
19
|
super()
|
|
20
20
|
hash = self.class.normalize(json)
|
|
21
21
|
@type = hash[:type]
|
|
22
|
-
@
|
|
22
|
+
@eval_id = hash[:eval_id]
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module Retab
|
|
6
|
+
class WorkflowEvalRunWorkflowScope < Retab::Types::BaseModel
|
|
7
|
+
|
|
8
|
+
HASH_ATTRS = {
|
|
9
|
+
type: :type
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
attr_accessor :type
|
|
13
|
+
|
|
14
|
+
def initialize(json)
|
|
15
|
+
super()
|
|
16
|
+
hash = self.class.normalize(json)
|
|
17
|
+
@type = hash[:type]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
require "json"
|
|
6
6
|
|
|
7
7
|
module Retab
|
|
8
|
-
class
|
|
8
|
+
class WorkflowEvalRuns
|
|
9
9
|
def initialize(client)
|
|
10
10
|
@client = client
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
# List
|
|
13
|
+
# List Workflow Eval Runs
|
|
14
14
|
# @param workflow_id [String, nil]
|
|
15
|
-
# @param
|
|
15
|
+
# @param eval_id [String, nil]
|
|
16
16
|
# @param target_block_id [String, nil]
|
|
17
17
|
# @param status [String, nil]
|
|
18
18
|
# @param exclude_status [String, nil]
|
|
@@ -23,12 +23,12 @@ module Retab
|
|
|
23
23
|
# @param before [String, nil]
|
|
24
24
|
# @param after [String, nil]
|
|
25
25
|
# @param limit [Integer, nil]
|
|
26
|
-
# @param order [Retab::Types::
|
|
26
|
+
# @param order [Retab::Types::WorkflowEvalRunsOrder, nil]
|
|
27
27
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
28
|
-
# @return [Retab::PaginatedList<Retab::
|
|
28
|
+
# @return [Retab::PaginatedList<Retab::WorkflowEvalRun>]
|
|
29
29
|
def list(
|
|
30
30
|
workflow_id: nil,
|
|
31
|
-
|
|
31
|
+
eval_id: nil,
|
|
32
32
|
target_block_id: nil,
|
|
33
33
|
status: nil,
|
|
34
34
|
exclude_status: nil,
|
|
@@ -44,7 +44,7 @@ module Retab
|
|
|
44
44
|
)
|
|
45
45
|
params = {
|
|
46
46
|
"workflow_id" => workflow_id,
|
|
47
|
-
"
|
|
47
|
+
"eval_id" => eval_id,
|
|
48
48
|
"target_block_id" => target_block_id,
|
|
49
49
|
"status" => status,
|
|
50
50
|
"exclude_status" => exclude_status,
|
|
@@ -59,7 +59,7 @@ module Retab
|
|
|
59
59
|
}.compact
|
|
60
60
|
response = @client.request(
|
|
61
61
|
method: :get,
|
|
62
|
-
path: "/v1/workflows/
|
|
62
|
+
path: "/v1/workflows/evals/runs",
|
|
63
63
|
auth: true,
|
|
64
64
|
params: params,
|
|
65
65
|
request_options: request_options
|
|
@@ -67,7 +67,7 @@ module Retab
|
|
|
67
67
|
fetch_next = -> (cursor) {
|
|
68
68
|
list(
|
|
69
69
|
workflow_id: workflow_id,
|
|
70
|
-
|
|
70
|
+
eval_id: eval_id,
|
|
71
71
|
target_block_id: target_block_id,
|
|
72
72
|
status: status,
|
|
73
73
|
exclude_status: exclude_status,
|
|
@@ -84,10 +84,10 @@ module Retab
|
|
|
84
84
|
}
|
|
85
85
|
Retab::PaginatedList.from_response(
|
|
86
86
|
response,
|
|
87
|
-
model: Retab::
|
|
87
|
+
model: Retab::WorkflowEvalRun,
|
|
88
88
|
filters: {
|
|
89
89
|
workflow_id: workflow_id,
|
|
90
|
-
|
|
90
|
+
eval_id: eval_id,
|
|
91
91
|
target_block_id: target_block_id,
|
|
92
92
|
status: status,
|
|
93
93
|
exclude_status: exclude_status,
|
|
@@ -103,11 +103,11 @@ module Retab
|
|
|
103
103
|
)
|
|
104
104
|
end
|
|
105
105
|
|
|
106
|
-
# Create
|
|
106
|
+
# Create Workflow Eval Run
|
|
107
107
|
# @param workflow_id [String]
|
|
108
|
-
# @param scope [Retab::
|
|
108
|
+
# @param scope [Retab::WorkflowEvalRunSingleScope, Retab::WorkflowEvalRunWorkflowScope, Retab::WorkflowEvalRunBlockScope, nil] Optional execution scope. Omit (or pass null) to run every saved eval in the workflow.
|
|
109
109
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
110
|
-
# @return [Retab::
|
|
110
|
+
# @return [Retab::WorkflowEvalRun]
|
|
111
111
|
def create(
|
|
112
112
|
workflow_id:,
|
|
113
113
|
scope: nil,
|
|
@@ -119,12 +119,12 @@ module Retab
|
|
|
119
119
|
}.compact
|
|
120
120
|
response = @client.request(
|
|
121
121
|
method: :post,
|
|
122
|
-
path: "/v1/workflows/
|
|
122
|
+
path: "/v1/workflows/evals/runs",
|
|
123
123
|
auth: true,
|
|
124
124
|
body: body,
|
|
125
125
|
request_options: request_options
|
|
126
126
|
)
|
|
127
|
-
result = Retab::
|
|
127
|
+
result = Retab::WorkflowEvalRun.new(response.body)
|
|
128
128
|
result.last_response = Retab::Types::ApiResponse.new(
|
|
129
129
|
http_status: response.code.to_i,
|
|
130
130
|
http_headers: response.each_header.to_h,
|
|
@@ -133,21 +133,21 @@ module Retab
|
|
|
133
133
|
result
|
|
134
134
|
end
|
|
135
135
|
|
|
136
|
-
# Get
|
|
136
|
+
# Get Workflow Eval Run
|
|
137
137
|
# @param run_id [String]
|
|
138
138
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
139
|
-
# @return [Retab::
|
|
139
|
+
# @return [Retab::WorkflowEvalRun]
|
|
140
140
|
def get(
|
|
141
141
|
run_id:,
|
|
142
142
|
request_options: {}
|
|
143
143
|
)
|
|
144
144
|
response = @client.request(
|
|
145
145
|
method: :get,
|
|
146
|
-
path: "/v1/workflows/
|
|
146
|
+
path: "/v1/workflows/evals/runs/#{Retab::Util.encode_path(run_id)}",
|
|
147
147
|
auth: true,
|
|
148
148
|
request_options: request_options
|
|
149
149
|
)
|
|
150
|
-
result = Retab::
|
|
150
|
+
result = Retab::WorkflowEvalRun.new(response.body)
|
|
151
151
|
result.last_response = Retab::Types::ApiResponse.new(
|
|
152
152
|
http_status: response.code.to_i,
|
|
153
153
|
http_headers: response.each_header.to_h,
|
|
@@ -156,21 +156,21 @@ module Retab
|
|
|
156
156
|
result
|
|
157
157
|
end
|
|
158
158
|
|
|
159
|
-
# Cancel
|
|
159
|
+
# Cancel Workflow Eval Run
|
|
160
160
|
# @param run_id [String]
|
|
161
161
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
162
|
-
# @return [Retab::
|
|
162
|
+
# @return [Retab::WorkflowEvalRun]
|
|
163
163
|
def cancel(
|
|
164
164
|
run_id:,
|
|
165
165
|
request_options: {}
|
|
166
166
|
)
|
|
167
167
|
response = @client.request(
|
|
168
168
|
method: :post,
|
|
169
|
-
path: "/v1/workflows/
|
|
169
|
+
path: "/v1/workflows/evals/runs/#{Retab::Util.encode_path(run_id)}/cancel",
|
|
170
170
|
auth: true,
|
|
171
171
|
request_options: request_options
|
|
172
172
|
)
|
|
173
|
-
result = Retab::
|
|
173
|
+
result = Retab::WorkflowEvalRun.new(response.body)
|
|
174
174
|
result.last_response = Retab::Types::ApiResponse.new(
|
|
175
175
|
http_status: response.code.to_i,
|
|
176
176
|
http_headers: response.each_header.to_h,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module Retab
|
|
6
|
-
class
|
|
6
|
+
class CreateWorkflowEvalRequest < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
workflow_id: :workflow_id,
|
|
@@ -25,13 +25,13 @@ module Retab
|
|
|
25
25
|
super()
|
|
26
26
|
hash = self.class.normalize(json)
|
|
27
27
|
@workflow_id = hash[:workflow_id]
|
|
28
|
-
@target = hash[:target] ? Retab::
|
|
28
|
+
@target = hash[:target] ? Retab::WorkflowEvalBlockTarget.new(hash[:target]) : nil
|
|
29
29
|
@source = hash[:source] ? (
|
|
30
30
|
case hash[:source][:type]
|
|
31
31
|
when "manual"
|
|
32
|
-
Retab::
|
|
32
|
+
Retab::ManualWorkflowEvalSource.new(hash[:source])
|
|
33
33
|
when "run_step"
|
|
34
|
-
Retab::
|
|
34
|
+
Retab::RunStepWorkflowEvalSource.new(hash[:source])
|
|
35
35
|
else
|
|
36
36
|
hash[:source]
|
|
37
37
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module Retab
|
|
6
|
-
class
|
|
6
|
+
class LatestBlockEvalRunSummary < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
run_record_id: :run_record_id,
|
|
@@ -13,7 +13,7 @@ module Retab
|
|
|
13
13
|
completed_at: :completed_at,
|
|
14
14
|
duration_ms: :duration_ms,
|
|
15
15
|
workflow_draft_fingerprint: :workflow_draft_fingerprint,
|
|
16
|
-
|
|
16
|
+
block_execution_fingerprint: :block_execution_fingerprint,
|
|
17
17
|
validity_fingerprint: :validity_fingerprint,
|
|
18
18
|
handle_inputs_fingerprint: :handle_inputs_fingerprint,
|
|
19
19
|
assertions_passed: :assertions_passed,
|
|
@@ -29,7 +29,7 @@ module Retab
|
|
|
29
29
|
:completed_at,
|
|
30
30
|
:duration_ms,
|
|
31
31
|
:workflow_draft_fingerprint,
|
|
32
|
-
:
|
|
32
|
+
:block_execution_fingerprint,
|
|
33
33
|
:validity_fingerprint,
|
|
34
34
|
:handle_inputs_fingerprint,
|
|
35
35
|
:assertions_passed,
|
|
@@ -47,7 +47,7 @@ module Retab
|
|
|
47
47
|
@completed_at = hash[:completed_at]
|
|
48
48
|
@duration_ms = hash[:duration_ms]
|
|
49
49
|
@workflow_draft_fingerprint = hash[:workflow_draft_fingerprint]
|
|
50
|
-
@
|
|
50
|
+
@block_execution_fingerprint = hash[:block_execution_fingerprint]
|
|
51
51
|
@validity_fingerprint = hash[:validity_fingerprint]
|
|
52
52
|
@handle_inputs_fingerprint = hash[:handle_inputs_fingerprint]
|
|
53
53
|
@assertions_passed = hash[:assertions_passed]
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module Retab
|
|
6
|
-
class
|
|
6
|
+
class UpdateWorkflowEvalRequest < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
name: :name,
|
|
@@ -25,9 +25,9 @@ module Retab
|
|
|
25
25
|
@source = hash[:source] ? (
|
|
26
26
|
case hash[:source][:type]
|
|
27
27
|
when "manual"
|
|
28
|
-
Retab::
|
|
28
|
+
Retab::ManualWorkflowEvalSource.new(hash[:source])
|
|
29
29
|
when "run_step"
|
|
30
|
-
Retab::
|
|
30
|
+
Retab::RunStepWorkflowEvalSource.new(hash[:source])
|
|
31
31
|
else
|
|
32
32
|
hash[:source]
|
|
33
33
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module Retab
|
|
6
|
-
class
|
|
6
|
+
class WorkflowEval < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
id: :id,
|
|
@@ -54,13 +54,13 @@ module Retab
|
|
|
54
54
|
hash = self.class.normalize(json)
|
|
55
55
|
@id = hash[:id]
|
|
56
56
|
@workflow_id = hash[:workflow_id]
|
|
57
|
-
@target = hash[:target] ? Retab::
|
|
57
|
+
@target = hash[:target] ? Retab::WorkflowEvalBlockTarget.new(hash[:target]) : nil
|
|
58
58
|
@source = hash[:source] ? (
|
|
59
59
|
case hash[:source][:type]
|
|
60
60
|
when "manual"
|
|
61
|
-
Retab::
|
|
61
|
+
Retab::ManualWorkflowEvalSource.new(hash[:source])
|
|
62
62
|
when "run_step"
|
|
63
|
-
Retab::
|
|
63
|
+
Retab::RunStepWorkflowEvalSource.new(hash[:source])
|
|
64
64
|
else
|
|
65
65
|
hash[:source]
|
|
66
66
|
end
|
|
@@ -75,11 +75,11 @@ module Retab
|
|
|
75
75
|
@drift = hash[:drift] ? Retab::ArtifactDrift.new(hash[:drift]) : nil
|
|
76
76
|
@validation_status = hash[:validation_status].nil? ? "valid" : hash[:validation_status]
|
|
77
77
|
@validation_issues = (hash[:validation_issues] || [])
|
|
78
|
-
@latest_run_summary = hash[:latest_run_summary] ? Retab::
|
|
79
|
-
@latest_passing_run_summary = hash[:latest_passing_run_summary] ? Retab::
|
|
78
|
+
@latest_run_summary = hash[:latest_run_summary] ? Retab::LatestBlockEvalRunSummary.new(hash[:latest_run_summary]) : nil
|
|
79
|
+
@latest_passing_run_summary = hash[:latest_passing_run_summary] ? Retab::LatestBlockEvalRunSummary.new(
|
|
80
80
|
hash[:latest_passing_run_summary]
|
|
81
81
|
) : nil
|
|
82
|
-
@latest_failing_run_summary = hash[:latest_failing_run_summary] ? Retab::
|
|
82
|
+
@latest_failing_run_summary = hash[:latest_failing_run_summary] ? Retab::LatestBlockEvalRunSummary.new(
|
|
83
83
|
hash[:latest_failing_run_summary]
|
|
84
84
|
) : nil
|
|
85
85
|
@created_at = hash[:created_at]
|