openlayer 0.5.0 → 0.6.0
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/CHANGELOG.md +13 -0
- data/README.md +1 -1
- data/lib/openlayer/client.rb +4 -0
- data/lib/openlayer/internal/transport/pooled_net_requester.rb +12 -10
- data/lib/openlayer/models/test_evaluate_params.rb +50 -0
- data/lib/openlayer/models/test_evaluate_response.rb +75 -0
- data/lib/openlayer/models.rb +2 -0
- data/lib/openlayer/resources/tests.rb +50 -0
- data/lib/openlayer/version.rb +1 -1
- data/lib/openlayer.rb +3 -0
- data/rbi/openlayer/client.rbi +3 -0
- data/rbi/openlayer/models/test_evaluate_params.rbi +75 -0
- data/rbi/openlayer/models/test_evaluate_response.rbi +121 -0
- data/rbi/openlayer/models.rbi +2 -0
- data/rbi/openlayer/resources/tests.rbi +42 -0
- data/sig/openlayer/client.rbs +2 -0
- data/sig/openlayer/models/test_evaluate_params.rbs +45 -0
- data/sig/openlayer/models/test_evaluate_response.rbs +63 -0
- data/sig/openlayer/models.rbs +2 -0
- data/sig/openlayer/resources/tests.rbs +16 -0
- metadata +11 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 64b65f2a165246360f15851683cdb436ba3085a162f6d92705051bbbe8b1a06f
|
|
4
|
+
data.tar.gz: fa8a947ae1ed3777b684b40b7ab149fcd3abcf9f49548368207bd2de11b8ac23
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5f2feacbecff84829f14268a35a8970c0bc2adbb3a7e2edbe17e3273000e2c13c3060307cc4ea2786ed31f55fc66a54ca89340c4b46e3871530cfee5a9e72a2e
|
|
7
|
+
data.tar.gz: 93a098d60a590fa112d4426bb515c488f1c8f11f77e156ce451c1fbe7725678f19309cecd63bdf2a7eaa8161bb1a4864c926a5141ac030441ae3d67b96849578
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.0 (2025-12-17)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.5.0...v0.6.0](https://github.com/openlayer-ai/openlayer-ruby/compare/v0.5.0...v0.6.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add test evaluation method ([18f2855](https://github.com/openlayer-ai/openlayer-ruby/commit/18f28556f722aad06666f8a247e597328d218b14))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* calling `break` out of streams should be instantaneous ([8fe6142](https://github.com/openlayer-ai/openlayer-ruby/commit/8fe6142fdb2c5590bb28678f8fbf4958bdcfb9f9))
|
|
15
|
+
|
|
3
16
|
## 0.5.0 (2025-12-16)
|
|
4
17
|
|
|
5
18
|
Full Changelog: [v0.4.1...v0.5.0](https://github.com/openlayer-ai/openlayer-ruby/compare/v0.4.1...v0.5.0)
|
data/README.md
CHANGED
data/lib/openlayer/client.rb
CHANGED
|
@@ -30,6 +30,9 @@ module Openlayer
|
|
|
30
30
|
# @return [Openlayer::Resources::Storage]
|
|
31
31
|
attr_reader :storage
|
|
32
32
|
|
|
33
|
+
# @return [Openlayer::Resources::Tests]
|
|
34
|
+
attr_reader :tests
|
|
35
|
+
|
|
33
36
|
# @api private
|
|
34
37
|
#
|
|
35
38
|
# @return [Hash{String=>String}]
|
|
@@ -77,6 +80,7 @@ module Openlayer
|
|
|
77
80
|
@commits = Openlayer::Resources::Commits.new(client: self)
|
|
78
81
|
@inference_pipelines = Openlayer::Resources::InferencePipelines.new(client: self)
|
|
79
82
|
@storage = Openlayer::Resources::Storage.new(client: self)
|
|
83
|
+
@tests = Openlayer::Resources::Tests.new(client: self)
|
|
80
84
|
end
|
|
81
85
|
end
|
|
82
86
|
end
|
|
@@ -153,17 +153,19 @@ module Openlayer
|
|
|
153
153
|
end
|
|
154
154
|
|
|
155
155
|
self.class.calibrate_socket_timeout(conn, deadline)
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
156
|
+
::Kernel.catch(:jump) do
|
|
157
|
+
conn.request(req) do |rsp|
|
|
158
|
+
y << [req, rsp]
|
|
159
|
+
::Kernel.throw(:jump) if finished
|
|
160
|
+
|
|
161
|
+
rsp.read_body do |bytes|
|
|
162
|
+
y << bytes.force_encoding(Encoding::BINARY)
|
|
163
|
+
::Kernel.throw(:jump) if finished
|
|
164
|
+
|
|
165
|
+
self.class.calibrate_socket_timeout(conn, deadline)
|
|
166
|
+
end
|
|
167
|
+
eof = true
|
|
165
168
|
end
|
|
166
|
-
eof = true
|
|
167
169
|
end
|
|
168
170
|
end
|
|
169
171
|
ensure
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Openlayer
|
|
4
|
+
module Models
|
|
5
|
+
# @see Openlayer::Resources::Tests#evaluate
|
|
6
|
+
class TestEvaluateParams < Openlayer::Internal::Type::BaseModel
|
|
7
|
+
extend Openlayer::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Openlayer::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute end_timestamp
|
|
11
|
+
# End timestamp in seconds (Unix epoch)
|
|
12
|
+
#
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
required :end_timestamp, Integer, api_name: :endTimestamp
|
|
15
|
+
|
|
16
|
+
# @!attribute start_timestamp
|
|
17
|
+
# Start timestamp in seconds (Unix epoch)
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer]
|
|
20
|
+
required :start_timestamp, Integer, api_name: :startTimestamp
|
|
21
|
+
|
|
22
|
+
# @!attribute inference_pipeline_id
|
|
23
|
+
# ID of the inference pipeline to evaluate. If not provided, all inference
|
|
24
|
+
# pipelines the test applies to will be evaluated.
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
optional :inference_pipeline_id, String, api_name: :inferencePipelineId
|
|
28
|
+
|
|
29
|
+
# @!attribute overwrite_results
|
|
30
|
+
# Whether to overwrite existing test results
|
|
31
|
+
#
|
|
32
|
+
# @return [Boolean, nil]
|
|
33
|
+
optional :overwrite_results, Openlayer::Internal::Type::Boolean, api_name: :overwriteResults
|
|
34
|
+
|
|
35
|
+
# @!method initialize(end_timestamp:, start_timestamp:, inference_pipeline_id: nil, overwrite_results: nil, request_options: {})
|
|
36
|
+
# Some parameter documentations has been truncated, see
|
|
37
|
+
# {Openlayer::Models::TestEvaluateParams} for more details.
|
|
38
|
+
#
|
|
39
|
+
# @param end_timestamp [Integer] End timestamp in seconds (Unix epoch)
|
|
40
|
+
#
|
|
41
|
+
# @param start_timestamp [Integer] Start timestamp in seconds (Unix epoch)
|
|
42
|
+
#
|
|
43
|
+
# @param inference_pipeline_id [String] ID of the inference pipeline to evaluate. If not provided, all inference pipelin
|
|
44
|
+
#
|
|
45
|
+
# @param overwrite_results [Boolean] Whether to overwrite existing test results
|
|
46
|
+
#
|
|
47
|
+
# @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}]
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Openlayer
|
|
4
|
+
module Models
|
|
5
|
+
# @see Openlayer::Resources::Tests#evaluate
|
|
6
|
+
class TestEvaluateResponse < Openlayer::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute message
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :message, String
|
|
11
|
+
|
|
12
|
+
# @!attribute pipeline_count
|
|
13
|
+
# Number of inference pipelines the test was queued for evaluation on
|
|
14
|
+
#
|
|
15
|
+
# @return [Integer]
|
|
16
|
+
required :pipeline_count, Integer, api_name: :pipelineCount
|
|
17
|
+
|
|
18
|
+
# @!attribute requested_end_timestamp
|
|
19
|
+
# The end timestamp you requested (in seconds)
|
|
20
|
+
#
|
|
21
|
+
# @return [Integer]
|
|
22
|
+
required :requested_end_timestamp, Integer, api_name: :requestedEndTimestamp
|
|
23
|
+
|
|
24
|
+
# @!attribute requested_start_timestamp
|
|
25
|
+
# The start timestamp you requested (in seconds)
|
|
26
|
+
#
|
|
27
|
+
# @return [Integer]
|
|
28
|
+
required :requested_start_timestamp, Integer, api_name: :requestedStartTimestamp
|
|
29
|
+
|
|
30
|
+
# @!attribute tasks
|
|
31
|
+
# Array of background task information for each pipeline evaluation
|
|
32
|
+
#
|
|
33
|
+
# @return [Array<Openlayer::Models::TestEvaluateResponse::Task>]
|
|
34
|
+
required :tasks, -> { Openlayer::Internal::Type::ArrayOf[Openlayer::Models::TestEvaluateResponse::Task] }
|
|
35
|
+
|
|
36
|
+
# @!method initialize(message:, pipeline_count:, requested_end_timestamp:, requested_start_timestamp:, tasks:)
|
|
37
|
+
# @param message [String]
|
|
38
|
+
#
|
|
39
|
+
# @param pipeline_count [Integer] Number of inference pipelines the test was queued for evaluation on
|
|
40
|
+
#
|
|
41
|
+
# @param requested_end_timestamp [Integer] The end timestamp you requested (in seconds)
|
|
42
|
+
#
|
|
43
|
+
# @param requested_start_timestamp [Integer] The start timestamp you requested (in seconds)
|
|
44
|
+
#
|
|
45
|
+
# @param tasks [Array<Openlayer::Models::TestEvaluateResponse::Task>] Array of background task information for each pipeline evaluation
|
|
46
|
+
|
|
47
|
+
class Task < Openlayer::Internal::Type::BaseModel
|
|
48
|
+
# @!attribute pipeline_id
|
|
49
|
+
# ID of the inference pipeline this task is for
|
|
50
|
+
#
|
|
51
|
+
# @return [String]
|
|
52
|
+
required :pipeline_id, String, api_name: :pipelineId
|
|
53
|
+
|
|
54
|
+
# @!attribute task_result_id
|
|
55
|
+
# ID of the background task
|
|
56
|
+
#
|
|
57
|
+
# @return [String]
|
|
58
|
+
required :task_result_id, String, api_name: :taskResultId
|
|
59
|
+
|
|
60
|
+
# @!attribute task_result_url
|
|
61
|
+
# URL to check the status of this background task
|
|
62
|
+
#
|
|
63
|
+
# @return [String]
|
|
64
|
+
required :task_result_url, String, api_name: :taskResultUrl
|
|
65
|
+
|
|
66
|
+
# @!method initialize(pipeline_id:, task_result_id:, task_result_url:)
|
|
67
|
+
# @param pipeline_id [String] ID of the inference pipeline this task is for
|
|
68
|
+
#
|
|
69
|
+
# @param task_result_id [String] ID of the background task
|
|
70
|
+
#
|
|
71
|
+
# @param task_result_url [String] URL to check the status of this background task
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
data/lib/openlayer/models.rb
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Openlayer
|
|
4
|
+
module Resources
|
|
5
|
+
class Tests
|
|
6
|
+
# Some parameter documentations has been truncated, see
|
|
7
|
+
# {Openlayer::Models::TestEvaluateParams} for more details.
|
|
8
|
+
#
|
|
9
|
+
# Triggers one-off evaluation of a specific monitoring test for a custom timestamp
|
|
10
|
+
# range. This allows evaluating tests for historical data or custom time periods
|
|
11
|
+
# outside the regular evaluation window schedule. It also allows overwriting the
|
|
12
|
+
# existing test results.
|
|
13
|
+
#
|
|
14
|
+
# @overload evaluate(test_id, end_timestamp:, start_timestamp:, inference_pipeline_id: nil, overwrite_results: nil, request_options: {})
|
|
15
|
+
#
|
|
16
|
+
# @param test_id [String] The test id.
|
|
17
|
+
#
|
|
18
|
+
# @param end_timestamp [Integer] End timestamp in seconds (Unix epoch)
|
|
19
|
+
#
|
|
20
|
+
# @param start_timestamp [Integer] Start timestamp in seconds (Unix epoch)
|
|
21
|
+
#
|
|
22
|
+
# @param inference_pipeline_id [String] ID of the inference pipeline to evaluate. If not provided, all inference pipelin
|
|
23
|
+
#
|
|
24
|
+
# @param overwrite_results [Boolean] Whether to overwrite existing test results
|
|
25
|
+
#
|
|
26
|
+
# @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
27
|
+
#
|
|
28
|
+
# @return [Openlayer::Models::TestEvaluateResponse]
|
|
29
|
+
#
|
|
30
|
+
# @see Openlayer::Models::TestEvaluateParams
|
|
31
|
+
def evaluate(test_id, params)
|
|
32
|
+
parsed, options = Openlayer::TestEvaluateParams.dump_request(params)
|
|
33
|
+
@client.request(
|
|
34
|
+
method: :post,
|
|
35
|
+
path: ["tests/%1$s/evaluate", test_id],
|
|
36
|
+
body: parsed,
|
|
37
|
+
model: Openlayer::Models::TestEvaluateResponse,
|
|
38
|
+
options: options
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# @api private
|
|
43
|
+
#
|
|
44
|
+
# @param client [Openlayer::Client]
|
|
45
|
+
def initialize(client:)
|
|
46
|
+
@client = client
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
data/lib/openlayer/version.rb
CHANGED
data/lib/openlayer.rb
CHANGED
|
@@ -87,6 +87,8 @@ require_relative "openlayer/models/projects/test_update_params"
|
|
|
87
87
|
require_relative "openlayer/models/projects/test_update_response"
|
|
88
88
|
require_relative "openlayer/models/storage/presigned_url_create_params"
|
|
89
89
|
require_relative "openlayer/models/storage/presigned_url_create_response"
|
|
90
|
+
require_relative "openlayer/models/test_evaluate_params"
|
|
91
|
+
require_relative "openlayer/models/test_evaluate_response"
|
|
90
92
|
require_relative "openlayer/models"
|
|
91
93
|
require_relative "openlayer/resources/commits"
|
|
92
94
|
require_relative "openlayer/resources/commits/test_results"
|
|
@@ -100,3 +102,4 @@ require_relative "openlayer/resources/projects/inference_pipelines"
|
|
|
100
102
|
require_relative "openlayer/resources/projects/tests"
|
|
101
103
|
require_relative "openlayer/resources/storage"
|
|
102
104
|
require_relative "openlayer/resources/storage/presigned_url"
|
|
105
|
+
require_relative "openlayer/resources/tests"
|
data/rbi/openlayer/client.rbi
CHANGED
|
@@ -25,6 +25,9 @@ module Openlayer
|
|
|
25
25
|
sig { returns(Openlayer::Resources::Storage) }
|
|
26
26
|
attr_reader :storage
|
|
27
27
|
|
|
28
|
+
sig { returns(Openlayer::Resources::Tests) }
|
|
29
|
+
attr_reader :tests
|
|
30
|
+
|
|
28
31
|
# @api private
|
|
29
32
|
sig { override.returns(T::Hash[String, String]) }
|
|
30
33
|
private def auth_headers
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Openlayer
|
|
4
|
+
module Models
|
|
5
|
+
class TestEvaluateParams < Openlayer::Internal::Type::BaseModel
|
|
6
|
+
extend Openlayer::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Openlayer::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Openlayer::TestEvaluateParams, Openlayer::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# End timestamp in seconds (Unix epoch)
|
|
15
|
+
sig { returns(Integer) }
|
|
16
|
+
attr_accessor :end_timestamp
|
|
17
|
+
|
|
18
|
+
# Start timestamp in seconds (Unix epoch)
|
|
19
|
+
sig { returns(Integer) }
|
|
20
|
+
attr_accessor :start_timestamp
|
|
21
|
+
|
|
22
|
+
# ID of the inference pipeline to evaluate. If not provided, all inference
|
|
23
|
+
# pipelines the test applies to will be evaluated.
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_reader :inference_pipeline_id
|
|
26
|
+
|
|
27
|
+
sig { params(inference_pipeline_id: String).void }
|
|
28
|
+
attr_writer :inference_pipeline_id
|
|
29
|
+
|
|
30
|
+
# Whether to overwrite existing test results
|
|
31
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
32
|
+
attr_reader :overwrite_results
|
|
33
|
+
|
|
34
|
+
sig { params(overwrite_results: T::Boolean).void }
|
|
35
|
+
attr_writer :overwrite_results
|
|
36
|
+
|
|
37
|
+
sig do
|
|
38
|
+
params(
|
|
39
|
+
end_timestamp: Integer,
|
|
40
|
+
start_timestamp: Integer,
|
|
41
|
+
inference_pipeline_id: String,
|
|
42
|
+
overwrite_results: T::Boolean,
|
|
43
|
+
request_options: Openlayer::RequestOptions::OrHash
|
|
44
|
+
).returns(T.attached_class)
|
|
45
|
+
end
|
|
46
|
+
def self.new(
|
|
47
|
+
# End timestamp in seconds (Unix epoch)
|
|
48
|
+
end_timestamp:,
|
|
49
|
+
# Start timestamp in seconds (Unix epoch)
|
|
50
|
+
start_timestamp:,
|
|
51
|
+
# ID of the inference pipeline to evaluate. If not provided, all inference
|
|
52
|
+
# pipelines the test applies to will be evaluated.
|
|
53
|
+
inference_pipeline_id: nil,
|
|
54
|
+
# Whether to overwrite existing test results
|
|
55
|
+
overwrite_results: nil,
|
|
56
|
+
request_options: {}
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
sig do
|
|
61
|
+
override.returns(
|
|
62
|
+
{
|
|
63
|
+
end_timestamp: Integer,
|
|
64
|
+
start_timestamp: Integer,
|
|
65
|
+
inference_pipeline_id: String,
|
|
66
|
+
overwrite_results: T::Boolean,
|
|
67
|
+
request_options: Openlayer::RequestOptions
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
def to_hash
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Openlayer
|
|
4
|
+
module Models
|
|
5
|
+
class TestEvaluateResponse < Openlayer::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Openlayer::Models::TestEvaluateResponse,
|
|
10
|
+
Openlayer::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :message
|
|
16
|
+
|
|
17
|
+
# Number of inference pipelines the test was queued for evaluation on
|
|
18
|
+
sig { returns(Integer) }
|
|
19
|
+
attr_accessor :pipeline_count
|
|
20
|
+
|
|
21
|
+
# The end timestamp you requested (in seconds)
|
|
22
|
+
sig { returns(Integer) }
|
|
23
|
+
attr_accessor :requested_end_timestamp
|
|
24
|
+
|
|
25
|
+
# The start timestamp you requested (in seconds)
|
|
26
|
+
sig { returns(Integer) }
|
|
27
|
+
attr_accessor :requested_start_timestamp
|
|
28
|
+
|
|
29
|
+
# Array of background task information for each pipeline evaluation
|
|
30
|
+
sig { returns(T::Array[Openlayer::Models::TestEvaluateResponse::Task]) }
|
|
31
|
+
attr_accessor :tasks
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
message: String,
|
|
36
|
+
pipeline_count: Integer,
|
|
37
|
+
requested_end_timestamp: Integer,
|
|
38
|
+
requested_start_timestamp: Integer,
|
|
39
|
+
tasks: T::Array[Openlayer::Models::TestEvaluateResponse::Task::OrHash]
|
|
40
|
+
).returns(T.attached_class)
|
|
41
|
+
end
|
|
42
|
+
def self.new(
|
|
43
|
+
message:,
|
|
44
|
+
# Number of inference pipelines the test was queued for evaluation on
|
|
45
|
+
pipeline_count:,
|
|
46
|
+
# The end timestamp you requested (in seconds)
|
|
47
|
+
requested_end_timestamp:,
|
|
48
|
+
# The start timestamp you requested (in seconds)
|
|
49
|
+
requested_start_timestamp:,
|
|
50
|
+
# Array of background task information for each pipeline evaluation
|
|
51
|
+
tasks:
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
sig do
|
|
56
|
+
override.returns(
|
|
57
|
+
{
|
|
58
|
+
message: String,
|
|
59
|
+
pipeline_count: Integer,
|
|
60
|
+
requested_end_timestamp: Integer,
|
|
61
|
+
requested_start_timestamp: Integer,
|
|
62
|
+
tasks: T::Array[Openlayer::Models::TestEvaluateResponse::Task]
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
def to_hash
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
class Task < Openlayer::Internal::Type::BaseModel
|
|
70
|
+
OrHash =
|
|
71
|
+
T.type_alias do
|
|
72
|
+
T.any(
|
|
73
|
+
Openlayer::Models::TestEvaluateResponse::Task,
|
|
74
|
+
Openlayer::Internal::AnyHash
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# ID of the inference pipeline this task is for
|
|
79
|
+
sig { returns(String) }
|
|
80
|
+
attr_accessor :pipeline_id
|
|
81
|
+
|
|
82
|
+
# ID of the background task
|
|
83
|
+
sig { returns(String) }
|
|
84
|
+
attr_accessor :task_result_id
|
|
85
|
+
|
|
86
|
+
# URL to check the status of this background task
|
|
87
|
+
sig { returns(String) }
|
|
88
|
+
attr_accessor :task_result_url
|
|
89
|
+
|
|
90
|
+
sig do
|
|
91
|
+
params(
|
|
92
|
+
pipeline_id: String,
|
|
93
|
+
task_result_id: String,
|
|
94
|
+
task_result_url: String
|
|
95
|
+
).returns(T.attached_class)
|
|
96
|
+
end
|
|
97
|
+
def self.new(
|
|
98
|
+
# ID of the inference pipeline this task is for
|
|
99
|
+
pipeline_id:,
|
|
100
|
+
# ID of the background task
|
|
101
|
+
task_result_id:,
|
|
102
|
+
# URL to check the status of this background task
|
|
103
|
+
task_result_url:
|
|
104
|
+
)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
sig do
|
|
108
|
+
override.returns(
|
|
109
|
+
{
|
|
110
|
+
pipeline_id: String,
|
|
111
|
+
task_result_id: String,
|
|
112
|
+
task_result_url: String
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
end
|
|
116
|
+
def to_hash
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
data/rbi/openlayer/models.rbi
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Openlayer
|
|
4
|
+
module Resources
|
|
5
|
+
class Tests
|
|
6
|
+
# Triggers one-off evaluation of a specific monitoring test for a custom timestamp
|
|
7
|
+
# range. This allows evaluating tests for historical data or custom time periods
|
|
8
|
+
# outside the regular evaluation window schedule. It also allows overwriting the
|
|
9
|
+
# existing test results.
|
|
10
|
+
sig do
|
|
11
|
+
params(
|
|
12
|
+
test_id: String,
|
|
13
|
+
end_timestamp: Integer,
|
|
14
|
+
start_timestamp: Integer,
|
|
15
|
+
inference_pipeline_id: String,
|
|
16
|
+
overwrite_results: T::Boolean,
|
|
17
|
+
request_options: Openlayer::RequestOptions::OrHash
|
|
18
|
+
).returns(Openlayer::Models::TestEvaluateResponse)
|
|
19
|
+
end
|
|
20
|
+
def evaluate(
|
|
21
|
+
# The test id.
|
|
22
|
+
test_id,
|
|
23
|
+
# End timestamp in seconds (Unix epoch)
|
|
24
|
+
end_timestamp:,
|
|
25
|
+
# Start timestamp in seconds (Unix epoch)
|
|
26
|
+
start_timestamp:,
|
|
27
|
+
# ID of the inference pipeline to evaluate. If not provided, all inference
|
|
28
|
+
# pipelines the test applies to will be evaluated.
|
|
29
|
+
inference_pipeline_id: nil,
|
|
30
|
+
# Whether to overwrite existing test results
|
|
31
|
+
overwrite_results: nil,
|
|
32
|
+
request_options: {}
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# @api private
|
|
37
|
+
sig { params(client: Openlayer::Client).returns(T.attached_class) }
|
|
38
|
+
def self.new(client:)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
data/sig/openlayer/client.rbs
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module Openlayer
|
|
2
|
+
module Models
|
|
3
|
+
type test_evaluate_params =
|
|
4
|
+
{
|
|
5
|
+
end_timestamp: Integer,
|
|
6
|
+
start_timestamp: Integer,
|
|
7
|
+
inference_pipeline_id: String,
|
|
8
|
+
overwrite_results: bool
|
|
9
|
+
}
|
|
10
|
+
& Openlayer::Internal::Type::request_parameters
|
|
11
|
+
|
|
12
|
+
class TestEvaluateParams < Openlayer::Internal::Type::BaseModel
|
|
13
|
+
extend Openlayer::Internal::Type::RequestParameters::Converter
|
|
14
|
+
include Openlayer::Internal::Type::RequestParameters
|
|
15
|
+
|
|
16
|
+
attr_accessor end_timestamp: Integer
|
|
17
|
+
|
|
18
|
+
attr_accessor start_timestamp: Integer
|
|
19
|
+
|
|
20
|
+
attr_reader inference_pipeline_id: String?
|
|
21
|
+
|
|
22
|
+
def inference_pipeline_id=: (String) -> String
|
|
23
|
+
|
|
24
|
+
attr_reader overwrite_results: bool?
|
|
25
|
+
|
|
26
|
+
def overwrite_results=: (bool) -> bool
|
|
27
|
+
|
|
28
|
+
def initialize: (
|
|
29
|
+
end_timestamp: Integer,
|
|
30
|
+
start_timestamp: Integer,
|
|
31
|
+
?inference_pipeline_id: String,
|
|
32
|
+
?overwrite_results: bool,
|
|
33
|
+
?request_options: Openlayer::request_opts
|
|
34
|
+
) -> void
|
|
35
|
+
|
|
36
|
+
def to_hash: -> {
|
|
37
|
+
end_timestamp: Integer,
|
|
38
|
+
start_timestamp: Integer,
|
|
39
|
+
inference_pipeline_id: String,
|
|
40
|
+
overwrite_results: bool,
|
|
41
|
+
request_options: Openlayer::RequestOptions
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
module Openlayer
|
|
2
|
+
module Models
|
|
3
|
+
type test_evaluate_response =
|
|
4
|
+
{
|
|
5
|
+
message: String,
|
|
6
|
+
pipeline_count: Integer,
|
|
7
|
+
requested_end_timestamp: Integer,
|
|
8
|
+
requested_start_timestamp: Integer,
|
|
9
|
+
tasks: ::Array[Openlayer::Models::TestEvaluateResponse::Task]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class TestEvaluateResponse < Openlayer::Internal::Type::BaseModel
|
|
13
|
+
attr_accessor message: String
|
|
14
|
+
|
|
15
|
+
attr_accessor pipeline_count: Integer
|
|
16
|
+
|
|
17
|
+
attr_accessor requested_end_timestamp: Integer
|
|
18
|
+
|
|
19
|
+
attr_accessor requested_start_timestamp: Integer
|
|
20
|
+
|
|
21
|
+
attr_accessor tasks: ::Array[Openlayer::Models::TestEvaluateResponse::Task]
|
|
22
|
+
|
|
23
|
+
def initialize: (
|
|
24
|
+
message: String,
|
|
25
|
+
pipeline_count: Integer,
|
|
26
|
+
requested_end_timestamp: Integer,
|
|
27
|
+
requested_start_timestamp: Integer,
|
|
28
|
+
tasks: ::Array[Openlayer::Models::TestEvaluateResponse::Task]
|
|
29
|
+
) -> void
|
|
30
|
+
|
|
31
|
+
def to_hash: -> {
|
|
32
|
+
message: String,
|
|
33
|
+
pipeline_count: Integer,
|
|
34
|
+
requested_end_timestamp: Integer,
|
|
35
|
+
requested_start_timestamp: Integer,
|
|
36
|
+
tasks: ::Array[Openlayer::Models::TestEvaluateResponse::Task]
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
type task =
|
|
40
|
+
{ pipeline_id: String, task_result_id: String, task_result_url: String }
|
|
41
|
+
|
|
42
|
+
class Task < Openlayer::Internal::Type::BaseModel
|
|
43
|
+
attr_accessor pipeline_id: String
|
|
44
|
+
|
|
45
|
+
attr_accessor task_result_id: String
|
|
46
|
+
|
|
47
|
+
attr_accessor task_result_url: String
|
|
48
|
+
|
|
49
|
+
def initialize: (
|
|
50
|
+
pipeline_id: String,
|
|
51
|
+
task_result_id: String,
|
|
52
|
+
task_result_url: String
|
|
53
|
+
) -> void
|
|
54
|
+
|
|
55
|
+
def to_hash: -> {
|
|
56
|
+
pipeline_id: String,
|
|
57
|
+
task_result_id: String,
|
|
58
|
+
task_result_url: String
|
|
59
|
+
}
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
data/sig/openlayer/models.rbs
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module Openlayer
|
|
2
|
+
module Resources
|
|
3
|
+
class Tests
|
|
4
|
+
def evaluate: (
|
|
5
|
+
String test_id,
|
|
6
|
+
end_timestamp: Integer,
|
|
7
|
+
start_timestamp: Integer,
|
|
8
|
+
?inference_pipeline_id: String,
|
|
9
|
+
?overwrite_results: bool,
|
|
10
|
+
?request_options: Openlayer::request_opts
|
|
11
|
+
) -> Openlayer::Models::TestEvaluateResponse
|
|
12
|
+
|
|
13
|
+
def initialize: (client: Openlayer::Client) -> void
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openlayer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Openlayer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-12-
|
|
11
|
+
date: 2025-12-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: connection_pool
|
|
@@ -90,6 +90,8 @@ files:
|
|
|
90
90
|
- lib/openlayer/models/projects/test_update_response.rb
|
|
91
91
|
- lib/openlayer/models/storage/presigned_url_create_params.rb
|
|
92
92
|
- lib/openlayer/models/storage/presigned_url_create_response.rb
|
|
93
|
+
- lib/openlayer/models/test_evaluate_params.rb
|
|
94
|
+
- lib/openlayer/models/test_evaluate_response.rb
|
|
93
95
|
- lib/openlayer/request_options.rb
|
|
94
96
|
- lib/openlayer/resources/commits.rb
|
|
95
97
|
- lib/openlayer/resources/commits/test_results.rb
|
|
@@ -103,6 +105,7 @@ files:
|
|
|
103
105
|
- lib/openlayer/resources/projects/tests.rb
|
|
104
106
|
- lib/openlayer/resources/storage.rb
|
|
105
107
|
- lib/openlayer/resources/storage/presigned_url.rb
|
|
108
|
+
- lib/openlayer/resources/tests.rb
|
|
106
109
|
- lib/openlayer/version.rb
|
|
107
110
|
- manifest.yaml
|
|
108
111
|
- rbi/openlayer/client.rbi
|
|
@@ -159,6 +162,8 @@ files:
|
|
|
159
162
|
- rbi/openlayer/models/projects/test_update_response.rbi
|
|
160
163
|
- rbi/openlayer/models/storage/presigned_url_create_params.rbi
|
|
161
164
|
- rbi/openlayer/models/storage/presigned_url_create_response.rbi
|
|
165
|
+
- rbi/openlayer/models/test_evaluate_params.rbi
|
|
166
|
+
- rbi/openlayer/models/test_evaluate_response.rbi
|
|
162
167
|
- rbi/openlayer/request_options.rbi
|
|
163
168
|
- rbi/openlayer/resources/commits.rbi
|
|
164
169
|
- rbi/openlayer/resources/commits/test_results.rbi
|
|
@@ -172,6 +177,7 @@ files:
|
|
|
172
177
|
- rbi/openlayer/resources/projects/tests.rbi
|
|
173
178
|
- rbi/openlayer/resources/storage.rbi
|
|
174
179
|
- rbi/openlayer/resources/storage/presigned_url.rbi
|
|
180
|
+
- rbi/openlayer/resources/tests.rbi
|
|
175
181
|
- rbi/openlayer/version.rbi
|
|
176
182
|
- sig/openlayer/client.rbs
|
|
177
183
|
- sig/openlayer/errors.rbs
|
|
@@ -227,6 +233,8 @@ files:
|
|
|
227
233
|
- sig/openlayer/models/projects/test_update_response.rbs
|
|
228
234
|
- sig/openlayer/models/storage/presigned_url_create_params.rbs
|
|
229
235
|
- sig/openlayer/models/storage/presigned_url_create_response.rbs
|
|
236
|
+
- sig/openlayer/models/test_evaluate_params.rbs
|
|
237
|
+
- sig/openlayer/models/test_evaluate_response.rbs
|
|
230
238
|
- sig/openlayer/request_options.rbs
|
|
231
239
|
- sig/openlayer/resources/commits.rbs
|
|
232
240
|
- sig/openlayer/resources/commits/test_results.rbs
|
|
@@ -240,6 +248,7 @@ files:
|
|
|
240
248
|
- sig/openlayer/resources/projects/tests.rbs
|
|
241
249
|
- sig/openlayer/resources/storage.rbs
|
|
242
250
|
- sig/openlayer/resources/storage/presigned_url.rbs
|
|
251
|
+
- sig/openlayer/resources/tests.rbs
|
|
243
252
|
- sig/openlayer/version.rbs
|
|
244
253
|
homepage: https://gemdocs.org/gems/openlayer
|
|
245
254
|
licenses: []
|