openlayer 0.4.1 → 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 +35 -0
- data/README.md +1 -1
- data/lib/openlayer/client.rb +4 -0
- data/lib/openlayer/internal/transport/base_client.rb +7 -1
- data/lib/openlayer/internal/transport/pooled_net_requester.rb +38 -26
- data/lib/openlayer/internal/util.rb +3 -2
- data/lib/openlayer/models/inference_pipeline_retrieve_response.rb +507 -1
- data/lib/openlayer/models/inference_pipeline_update_response.rb +507 -1
- data/lib/openlayer/models/projects/inference_pipeline_create_params.rb +609 -1
- data/lib/openlayer/models/projects/inference_pipeline_create_response.rb +507 -1
- data/lib/openlayer/models/projects/inference_pipeline_list_response.rb +507 -1
- data/lib/openlayer/models/projects/test_create_params.rb +49 -1
- data/lib/openlayer/models/projects/test_create_response.rb +49 -1
- data/lib/openlayer/models/projects/test_list_response.rb +49 -1
- 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/projects/inference_pipelines.rb +3 -1
- data/lib/openlayer/resources/projects/tests.rb +9 -1
- data/lib/openlayer/resources/tests.rb +50 -0
- data/lib/openlayer/version.rb +1 -1
- data/lib/openlayer.rb +5 -0
- data/manifest.yaml +2 -0
- data/rbi/openlayer/client.rbi +3 -0
- data/rbi/openlayer/internal/transport/base_client.rbi +5 -0
- data/rbi/openlayer/internal/transport/pooled_net_requester.rbi +6 -2
- data/rbi/openlayer/internal/type/base_model.rbi +8 -4
- data/rbi/openlayer/models/inference_pipeline_retrieve_response.rbi +948 -0
- data/rbi/openlayer/models/inference_pipeline_update_response.rbi +948 -0
- data/rbi/openlayer/models/projects/inference_pipeline_create_params.rbi +1095 -0
- data/rbi/openlayer/models/projects/inference_pipeline_create_response.rbi +952 -0
- data/rbi/openlayer/models/projects/inference_pipeline_list_response.rbi +952 -0
- data/rbi/openlayer/models/projects/test_create_params.rbi +40 -0
- data/rbi/openlayer/models/projects/test_create_response.rbi +40 -0
- data/rbi/openlayer/models/projects/test_list_response.rbi +40 -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/projects/inference_pipelines.rbi +12 -0
- data/rbi/openlayer/resources/projects/tests.rbi +16 -0
- data/rbi/openlayer/resources/tests.rbi +42 -0
- data/sig/openlayer/client.rbs +2 -0
- data/sig/openlayer/internal/transport/base_client.rbs +2 -0
- data/sig/openlayer/internal/transport/pooled_net_requester.rbs +4 -1
- data/sig/openlayer/models/inference_pipeline_retrieve_response.rbs +473 -0
- data/sig/openlayer/models/inference_pipeline_update_response.rbs +473 -0
- data/sig/openlayer/models/projects/inference_pipeline_create_params.rbs +493 -0
- data/sig/openlayer/models/projects/inference_pipeline_create_response.rbs +473 -0
- data/sig/openlayer/models/projects/inference_pipeline_list_response.rbs +473 -0
- data/sig/openlayer/models/projects/test_create_params.rbs +20 -0
- data/sig/openlayer/models/projects/test_create_response.rbs +20 -0
- data/sig/openlayer/models/projects/test_list_response.rbs +20 -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/projects/inference_pipelines.rbs +1 -0
- data/sig/openlayer/resources/projects/tests.rbs +4 -0
- data/sig/openlayer/resources/tests.rbs +16 -0
- metadata +11 -2
|
@@ -45,6 +45,11 @@ module Openlayer
|
|
|
45
45
|
sig { params(archived: T::Boolean).void }
|
|
46
46
|
attr_writer :archived
|
|
47
47
|
|
|
48
|
+
# Whether to apply the test to all pipelines (data sources) or to a specific set
|
|
49
|
+
# of pipelines. Only applies to tests that use production data.
|
|
50
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
51
|
+
attr_accessor :default_to_all_pipelines
|
|
52
|
+
|
|
48
53
|
# The delay window in seconds. Only applies to tests that use production data.
|
|
49
54
|
sig { returns(T.nilable(Float)) }
|
|
50
55
|
attr_accessor :delay_window
|
|
@@ -54,6 +59,21 @@ module Openlayer
|
|
|
54
59
|
sig { returns(T.nilable(Float)) }
|
|
55
60
|
attr_accessor :evaluation_window
|
|
56
61
|
|
|
62
|
+
# Array of pipelines (data sources) to which the test should not be applied. Only
|
|
63
|
+
# applies to tests that use production data.
|
|
64
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
65
|
+
attr_accessor :exclude_pipelines
|
|
66
|
+
|
|
67
|
+
# Whether to include historical data in the test result. Only applies to tests
|
|
68
|
+
# that use production data.
|
|
69
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
70
|
+
attr_accessor :include_historical_data
|
|
71
|
+
|
|
72
|
+
# Array of pipelines (data sources) to which the test should be applied. Only
|
|
73
|
+
# applies to tests that use production data.
|
|
74
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
75
|
+
attr_accessor :include_pipelines
|
|
76
|
+
|
|
57
77
|
# Whether the test uses an ML model.
|
|
58
78
|
sig { returns(T.nilable(T::Boolean)) }
|
|
59
79
|
attr_reader :uses_ml_model
|
|
@@ -100,8 +120,12 @@ module Openlayer
|
|
|
100
120
|
],
|
|
101
121
|
type: Openlayer::Projects::TestCreateParams::Type::OrSymbol,
|
|
102
122
|
archived: T::Boolean,
|
|
123
|
+
default_to_all_pipelines: T.nilable(T::Boolean),
|
|
103
124
|
delay_window: T.nilable(Float),
|
|
104
125
|
evaluation_window: T.nilable(Float),
|
|
126
|
+
exclude_pipelines: T.nilable(T::Array[String]),
|
|
127
|
+
include_historical_data: T.nilable(T::Boolean),
|
|
128
|
+
include_pipelines: T.nilable(T::Array[String]),
|
|
105
129
|
uses_ml_model: T::Boolean,
|
|
106
130
|
uses_production_data: T::Boolean,
|
|
107
131
|
uses_reference_dataset: T::Boolean,
|
|
@@ -122,11 +146,23 @@ module Openlayer
|
|
|
122
146
|
type:,
|
|
123
147
|
# Whether the test is archived.
|
|
124
148
|
archived: nil,
|
|
149
|
+
# Whether to apply the test to all pipelines (data sources) or to a specific set
|
|
150
|
+
# of pipelines. Only applies to tests that use production data.
|
|
151
|
+
default_to_all_pipelines: nil,
|
|
125
152
|
# The delay window in seconds. Only applies to tests that use production data.
|
|
126
153
|
delay_window: nil,
|
|
127
154
|
# The evaluation window in seconds. Only applies to tests that use production
|
|
128
155
|
# data.
|
|
129
156
|
evaluation_window: nil,
|
|
157
|
+
# Array of pipelines (data sources) to which the test should not be applied. Only
|
|
158
|
+
# applies to tests that use production data.
|
|
159
|
+
exclude_pipelines: nil,
|
|
160
|
+
# Whether to include historical data in the test result. Only applies to tests
|
|
161
|
+
# that use production data.
|
|
162
|
+
include_historical_data: nil,
|
|
163
|
+
# Array of pipelines (data sources) to which the test should be applied. Only
|
|
164
|
+
# applies to tests that use production data.
|
|
165
|
+
include_pipelines: nil,
|
|
130
166
|
# Whether the test uses an ML model.
|
|
131
167
|
uses_ml_model: nil,
|
|
132
168
|
# Whether the test uses production data (monitoring mode only).
|
|
@@ -151,8 +187,12 @@ module Openlayer
|
|
|
151
187
|
T::Array[Openlayer::Projects::TestCreateParams::Threshold],
|
|
152
188
|
type: Openlayer::Projects::TestCreateParams::Type::OrSymbol,
|
|
153
189
|
archived: T::Boolean,
|
|
190
|
+
default_to_all_pipelines: T.nilable(T::Boolean),
|
|
154
191
|
delay_window: T.nilable(Float),
|
|
155
192
|
evaluation_window: T.nilable(Float),
|
|
193
|
+
exclude_pipelines: T.nilable(T::Array[String]),
|
|
194
|
+
include_historical_data: T.nilable(T::Boolean),
|
|
195
|
+
include_pipelines: T.nilable(T::Array[String]),
|
|
156
196
|
uses_ml_model: T::Boolean,
|
|
157
197
|
uses_production_data: T::Boolean,
|
|
158
198
|
uses_reference_dataset: T::Boolean,
|
|
@@ -50,6 +50,11 @@ module Openlayer
|
|
|
50
50
|
sig { params(archived: T::Boolean).void }
|
|
51
51
|
attr_writer :archived
|
|
52
52
|
|
|
53
|
+
# Whether to apply the test to all pipelines (data sources) or to a specific set
|
|
54
|
+
# of pipelines. Only applies to tests that use production data.
|
|
55
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
56
|
+
attr_accessor :default_to_all_pipelines
|
|
57
|
+
|
|
53
58
|
# The delay window in seconds. Only applies to tests that use production data.
|
|
54
59
|
sig { returns(T.nilable(Float)) }
|
|
55
60
|
attr_accessor :delay_window
|
|
@@ -59,6 +64,21 @@ module Openlayer
|
|
|
59
64
|
sig { returns(T.nilable(Float)) }
|
|
60
65
|
attr_accessor :evaluation_window
|
|
61
66
|
|
|
67
|
+
# Array of pipelines (data sources) to which the test should not be applied. Only
|
|
68
|
+
# applies to tests that use production data.
|
|
69
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
70
|
+
attr_accessor :exclude_pipelines
|
|
71
|
+
|
|
72
|
+
# Whether to include historical data in the test result. Only applies to tests
|
|
73
|
+
# that use production data.
|
|
74
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
75
|
+
attr_accessor :include_historical_data
|
|
76
|
+
|
|
77
|
+
# Array of pipelines (data sources) to which the test should be applied. Only
|
|
78
|
+
# applies to tests that use production data.
|
|
79
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
80
|
+
attr_accessor :include_pipelines
|
|
81
|
+
|
|
62
82
|
# Whether the test uses an ML model.
|
|
63
83
|
sig { returns(T.nilable(T::Boolean)) }
|
|
64
84
|
attr_reader :uses_ml_model
|
|
@@ -152,8 +172,12 @@ module Openlayer
|
|
|
152
172
|
type:
|
|
153
173
|
Openlayer::Models::Projects::TestCreateResponse::Type::OrSymbol,
|
|
154
174
|
archived: T::Boolean,
|
|
175
|
+
default_to_all_pipelines: T.nilable(T::Boolean),
|
|
155
176
|
delay_window: T.nilable(Float),
|
|
156
177
|
evaluation_window: T.nilable(Float),
|
|
178
|
+
exclude_pipelines: T.nilable(T::Array[String]),
|
|
179
|
+
include_historical_data: T.nilable(T::Boolean),
|
|
180
|
+
include_pipelines: T.nilable(T::Array[String]),
|
|
157
181
|
uses_ml_model: T::Boolean,
|
|
158
182
|
uses_production_data: T::Boolean,
|
|
159
183
|
uses_reference_dataset: T::Boolean,
|
|
@@ -191,11 +215,23 @@ module Openlayer
|
|
|
191
215
|
type:,
|
|
192
216
|
# Whether the test is archived.
|
|
193
217
|
archived: nil,
|
|
218
|
+
# Whether to apply the test to all pipelines (data sources) or to a specific set
|
|
219
|
+
# of pipelines. Only applies to tests that use production data.
|
|
220
|
+
default_to_all_pipelines: nil,
|
|
194
221
|
# The delay window in seconds. Only applies to tests that use production data.
|
|
195
222
|
delay_window: nil,
|
|
196
223
|
# The evaluation window in seconds. Only applies to tests that use production
|
|
197
224
|
# data.
|
|
198
225
|
evaluation_window: nil,
|
|
226
|
+
# Array of pipelines (data sources) to which the test should not be applied. Only
|
|
227
|
+
# applies to tests that use production data.
|
|
228
|
+
exclude_pipelines: nil,
|
|
229
|
+
# Whether to include historical data in the test result. Only applies to tests
|
|
230
|
+
# that use production data.
|
|
231
|
+
include_historical_data: nil,
|
|
232
|
+
# Array of pipelines (data sources) to which the test should be applied. Only
|
|
233
|
+
# applies to tests that use production data.
|
|
234
|
+
include_pipelines: nil,
|
|
199
235
|
# Whether the test uses an ML model.
|
|
200
236
|
uses_ml_model: nil,
|
|
201
237
|
# Whether the test uses production data (monitoring mode only).
|
|
@@ -232,8 +268,12 @@ module Openlayer
|
|
|
232
268
|
type:
|
|
233
269
|
Openlayer::Models::Projects::TestCreateResponse::Type::TaggedSymbol,
|
|
234
270
|
archived: T::Boolean,
|
|
271
|
+
default_to_all_pipelines: T.nilable(T::Boolean),
|
|
235
272
|
delay_window: T.nilable(Float),
|
|
236
273
|
evaluation_window: T.nilable(Float),
|
|
274
|
+
exclude_pipelines: T.nilable(T::Array[String]),
|
|
275
|
+
include_historical_data: T.nilable(T::Boolean),
|
|
276
|
+
include_pipelines: T.nilable(T::Array[String]),
|
|
237
277
|
uses_ml_model: T::Boolean,
|
|
238
278
|
uses_production_data: T::Boolean,
|
|
239
279
|
uses_reference_dataset: T::Boolean,
|
|
@@ -88,6 +88,11 @@ module Openlayer
|
|
|
88
88
|
sig { params(archived: T::Boolean).void }
|
|
89
89
|
attr_writer :archived
|
|
90
90
|
|
|
91
|
+
# Whether to apply the test to all pipelines (data sources) or to a specific set
|
|
92
|
+
# of pipelines. Only applies to tests that use production data.
|
|
93
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
94
|
+
attr_accessor :default_to_all_pipelines
|
|
95
|
+
|
|
91
96
|
# The delay window in seconds. Only applies to tests that use production data.
|
|
92
97
|
sig { returns(T.nilable(Float)) }
|
|
93
98
|
attr_accessor :delay_window
|
|
@@ -97,6 +102,21 @@ module Openlayer
|
|
|
97
102
|
sig { returns(T.nilable(Float)) }
|
|
98
103
|
attr_accessor :evaluation_window
|
|
99
104
|
|
|
105
|
+
# Array of pipelines (data sources) to which the test should not be applied. Only
|
|
106
|
+
# applies to tests that use production data.
|
|
107
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
108
|
+
attr_accessor :exclude_pipelines
|
|
109
|
+
|
|
110
|
+
# Whether to include historical data in the test result. Only applies to tests
|
|
111
|
+
# that use production data.
|
|
112
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
113
|
+
attr_accessor :include_historical_data
|
|
114
|
+
|
|
115
|
+
# Array of pipelines (data sources) to which the test should be applied. Only
|
|
116
|
+
# applies to tests that use production data.
|
|
117
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
118
|
+
attr_accessor :include_pipelines
|
|
119
|
+
|
|
100
120
|
# Whether the test uses an ML model.
|
|
101
121
|
sig { returns(T.nilable(T::Boolean)) }
|
|
102
122
|
attr_reader :uses_ml_model
|
|
@@ -190,8 +210,12 @@ module Openlayer
|
|
|
190
210
|
type:
|
|
191
211
|
Openlayer::Models::Projects::TestListResponse::Item::Type::OrSymbol,
|
|
192
212
|
archived: T::Boolean,
|
|
213
|
+
default_to_all_pipelines: T.nilable(T::Boolean),
|
|
193
214
|
delay_window: T.nilable(Float),
|
|
194
215
|
evaluation_window: T.nilable(Float),
|
|
216
|
+
exclude_pipelines: T.nilable(T::Array[String]),
|
|
217
|
+
include_historical_data: T.nilable(T::Boolean),
|
|
218
|
+
include_pipelines: T.nilable(T::Array[String]),
|
|
195
219
|
uses_ml_model: T::Boolean,
|
|
196
220
|
uses_production_data: T::Boolean,
|
|
197
221
|
uses_reference_dataset: T::Boolean,
|
|
@@ -229,11 +253,23 @@ module Openlayer
|
|
|
229
253
|
type:,
|
|
230
254
|
# Whether the test is archived.
|
|
231
255
|
archived: nil,
|
|
256
|
+
# Whether to apply the test to all pipelines (data sources) or to a specific set
|
|
257
|
+
# of pipelines. Only applies to tests that use production data.
|
|
258
|
+
default_to_all_pipelines: nil,
|
|
232
259
|
# The delay window in seconds. Only applies to tests that use production data.
|
|
233
260
|
delay_window: nil,
|
|
234
261
|
# The evaluation window in seconds. Only applies to tests that use production
|
|
235
262
|
# data.
|
|
236
263
|
evaluation_window: nil,
|
|
264
|
+
# Array of pipelines (data sources) to which the test should not be applied. Only
|
|
265
|
+
# applies to tests that use production data.
|
|
266
|
+
exclude_pipelines: nil,
|
|
267
|
+
# Whether to include historical data in the test result. Only applies to tests
|
|
268
|
+
# that use production data.
|
|
269
|
+
include_historical_data: nil,
|
|
270
|
+
# Array of pipelines (data sources) to which the test should be applied. Only
|
|
271
|
+
# applies to tests that use production data.
|
|
272
|
+
include_pipelines: nil,
|
|
237
273
|
# Whether the test uses an ML model.
|
|
238
274
|
uses_ml_model: nil,
|
|
239
275
|
# Whether the test uses production data (monitoring mode only).
|
|
@@ -270,8 +306,12 @@ module Openlayer
|
|
|
270
306
|
type:
|
|
271
307
|
Openlayer::Models::Projects::TestListResponse::Item::Type::TaggedSymbol,
|
|
272
308
|
archived: T::Boolean,
|
|
309
|
+
default_to_all_pipelines: T.nilable(T::Boolean),
|
|
273
310
|
delay_window: T.nilable(Float),
|
|
274
311
|
evaluation_window: T.nilable(Float),
|
|
312
|
+
exclude_pipelines: T.nilable(T::Array[String]),
|
|
313
|
+
include_historical_data: T.nilable(T::Boolean),
|
|
314
|
+
include_pipelines: T.nilable(T::Array[String]),
|
|
275
315
|
uses_ml_model: T::Boolean,
|
|
276
316
|
uses_production_data: T::Boolean,
|
|
277
317
|
uses_reference_dataset: T::Boolean,
|
|
@@ -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
|
@@ -10,6 +10,17 @@ module Openlayer
|
|
|
10
10
|
project_id: String,
|
|
11
11
|
description: T.nilable(String),
|
|
12
12
|
name: String,
|
|
13
|
+
data_backend:
|
|
14
|
+
T.nilable(
|
|
15
|
+
T.any(
|
|
16
|
+
Openlayer::Projects::InferencePipelineCreateParams::DataBackend::UnionMember0::OrHash,
|
|
17
|
+
Openlayer::Projects::InferencePipelineCreateParams::DataBackend::BackendType::OrHash,
|
|
18
|
+
Openlayer::Projects::InferencePipelineCreateParams::DataBackend::UnionMember2::OrHash,
|
|
19
|
+
Openlayer::Projects::InferencePipelineCreateParams::DataBackend::UnionMember3::OrHash,
|
|
20
|
+
Openlayer::Projects::InferencePipelineCreateParams::DataBackend::UnionMember4::OrHash,
|
|
21
|
+
Openlayer::Projects::InferencePipelineCreateParams::DataBackend::UnionMember5::OrHash
|
|
22
|
+
)
|
|
23
|
+
),
|
|
13
24
|
project:
|
|
14
25
|
T.nilable(
|
|
15
26
|
Openlayer::Projects::InferencePipelineCreateParams::Project::OrHash
|
|
@@ -30,6 +41,7 @@ module Openlayer
|
|
|
30
41
|
description:,
|
|
31
42
|
# The inference pipeline name.
|
|
32
43
|
name:,
|
|
44
|
+
data_backend: nil,
|
|
33
45
|
project: nil,
|
|
34
46
|
workspace: nil,
|
|
35
47
|
request_options: {}
|
|
@@ -17,8 +17,12 @@ module Openlayer
|
|
|
17
17
|
],
|
|
18
18
|
type: Openlayer::Projects::TestCreateParams::Type::OrSymbol,
|
|
19
19
|
archived: T::Boolean,
|
|
20
|
+
default_to_all_pipelines: T.nilable(T::Boolean),
|
|
20
21
|
delay_window: T.nilable(Float),
|
|
21
22
|
evaluation_window: T.nilable(Float),
|
|
23
|
+
exclude_pipelines: T.nilable(T::Array[String]),
|
|
24
|
+
include_historical_data: T.nilable(T::Boolean),
|
|
25
|
+
include_pipelines: T.nilable(T::Array[String]),
|
|
22
26
|
uses_ml_model: T::Boolean,
|
|
23
27
|
uses_production_data: T::Boolean,
|
|
24
28
|
uses_reference_dataset: T::Boolean,
|
|
@@ -41,11 +45,23 @@ module Openlayer
|
|
|
41
45
|
type:,
|
|
42
46
|
# Whether the test is archived.
|
|
43
47
|
archived: nil,
|
|
48
|
+
# Whether to apply the test to all pipelines (data sources) or to a specific set
|
|
49
|
+
# of pipelines. Only applies to tests that use production data.
|
|
50
|
+
default_to_all_pipelines: nil,
|
|
44
51
|
# The delay window in seconds. Only applies to tests that use production data.
|
|
45
52
|
delay_window: nil,
|
|
46
53
|
# The evaluation window in seconds. Only applies to tests that use production
|
|
47
54
|
# data.
|
|
48
55
|
evaluation_window: nil,
|
|
56
|
+
# Array of pipelines (data sources) to which the test should not be applied. Only
|
|
57
|
+
# applies to tests that use production data.
|
|
58
|
+
exclude_pipelines: nil,
|
|
59
|
+
# Whether to include historical data in the test result. Only applies to tests
|
|
60
|
+
# that use production data.
|
|
61
|
+
include_historical_data: nil,
|
|
62
|
+
# Array of pipelines (data sources) to which the test should be applied. Only
|
|
63
|
+
# applies to tests that use production data.
|
|
64
|
+
include_pipelines: nil,
|
|
49
65
|
# Whether the test uses an ML model.
|
|
50
66
|
uses_ml_model: nil,
|
|
51
67
|
# Whether the test uses production data (monitoring mode only).
|
|
@@ -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
|
@@ -17,7 +17,10 @@ module Openlayer
|
|
|
17
17
|
|
|
18
18
|
DEFAULT_MAX_CONNECTIONS: Integer
|
|
19
19
|
|
|
20
|
-
def self.connect: (
|
|
20
|
+
def self.connect: (
|
|
21
|
+
cert_store: OpenSSL::X509::Store,
|
|
22
|
+
url: URI::Generic
|
|
23
|
+
) -> top
|
|
21
24
|
|
|
22
25
|
def self.calibrate_socket_timeout: (top conn, Float deadline) -> void
|
|
23
26
|
|