openlayer 0.3.0 → 0.4.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/.ignore +2 -0
- data/CHANGELOG.md +23 -0
- data/README.md +280 -39
- data/SECURITY.md +27 -0
- data/lib/openlayer/client.rb +64 -59
- data/lib/openlayer/errors.rb +228 -0
- data/lib/openlayer/file_part.rb +58 -0
- data/lib/openlayer/internal/transport/base_client.rb +567 -0
- data/lib/openlayer/internal/transport/pooled_net_requester.rb +198 -0
- data/lib/openlayer/internal/type/array_of.rb +168 -0
- data/lib/openlayer/internal/type/base_model.rb +531 -0
- data/lib/openlayer/internal/type/base_page.rb +55 -0
- data/lib/openlayer/internal/type/boolean.rb +77 -0
- data/lib/openlayer/internal/type/converter.rb +327 -0
- data/lib/openlayer/internal/type/enum.rb +131 -0
- data/lib/openlayer/internal/type/file_input.rb +111 -0
- data/lib/openlayer/internal/type/hash_of.rb +188 -0
- data/lib/openlayer/internal/type/request_parameters.rb +42 -0
- data/lib/openlayer/internal/type/union.rb +237 -0
- data/lib/openlayer/internal/type/unknown.rb +81 -0
- data/lib/openlayer/internal/util.rb +915 -0
- data/lib/openlayer/internal.rb +20 -0
- data/lib/openlayer/models/commit_retrieve_params.rb +14 -0
- data/lib/openlayer/models/commit_retrieve_response.rb +275 -0
- data/lib/openlayer/models/commits/test_result_list_params.rb +91 -0
- data/lib/openlayer/models/commits/test_result_list_response.rb +566 -0
- data/lib/openlayer/models/inference_pipeline_delete_params.rb +14 -0
- data/lib/openlayer/models/inference_pipeline_retrieve_params.rb +33 -0
- data/lib/openlayer/models/inference_pipeline_retrieve_response.rb +605 -0
- data/lib/openlayer/models/inference_pipeline_update_params.rb +42 -0
- data/lib/openlayer/models/inference_pipeline_update_response.rb +605 -0
- data/lib/openlayer/models/inference_pipelines/data_stream_params.rb +463 -0
- data/lib/openlayer/models/inference_pipelines/data_stream_response.rb +28 -0
- data/lib/openlayer/models/inference_pipelines/row_update_params.rb +90 -0
- data/lib/openlayer/models/inference_pipelines/row_update_response.rb +28 -0
- data/lib/openlayer/models/inference_pipelines/test_result_list_params.rb +83 -0
- data/lib/openlayer/models/inference_pipelines/test_result_list_response.rb +568 -0
- data/lib/openlayer/models/project_create_params.rb +51 -0
- data/lib/openlayer/models/project_create_response.rb +262 -0
- data/lib/openlayer/models/project_list_params.rb +59 -0
- data/lib/openlayer/models/project_list_response.rb +274 -0
- data/lib/openlayer/models/projects/commit_create_params.rb +61 -0
- data/lib/openlayer/models/projects/commit_create_response.rb +277 -0
- data/lib/openlayer/models/projects/commit_list_params.rb +32 -0
- data/lib/openlayer/models/projects/commit_list_response.rb +288 -0
- data/lib/openlayer/models/projects/inference_pipeline_create_params.rb +229 -0
- data/lib/openlayer/models/projects/inference_pipeline_create_response.rb +612 -0
- data/lib/openlayer/models/projects/inference_pipeline_list_params.rb +40 -0
- data/lib/openlayer/models/projects/inference_pipeline_list_response.rb +623 -0
- data/lib/openlayer/models/projects/test_create_params.rb +367 -0
- data/lib/openlayer/models/projects/test_create_response.rb +438 -0
- data/lib/openlayer/models/projects/test_list_params.rb +91 -0
- data/lib/openlayer/models/projects/test_list_response.rb +452 -0
- data/lib/openlayer/models/projects/test_update_params.rb +262 -0
- data/lib/openlayer/models/projects/test_update_response.rb +24 -0
- data/lib/openlayer/models/storage/presigned_url_create_params.rb +24 -0
- data/lib/openlayer/models/storage/presigned_url_create_response.rb +35 -0
- data/lib/openlayer/models.rb +61 -0
- data/lib/openlayer/request_options.rb +77 -0
- data/lib/openlayer/resources/commits/test_results.rb +51 -0
- data/lib/openlayer/resources/commits.rb +38 -0
- data/lib/openlayer/resources/inference_pipelines/data.rb +46 -0
- data/lib/openlayer/resources/inference_pipelines/rows.rb +46 -0
- data/lib/openlayer/resources/inference_pipelines/test_results.rb +49 -0
- data/lib/openlayer/resources/inference_pipelines.rb +101 -0
- data/lib/openlayer/resources/projects/commits.rb +72 -0
- data/lib/openlayer/resources/projects/inference_pipelines.rb +74 -0
- data/lib/openlayer/resources/projects/tests.rb +135 -0
- data/lib/openlayer/resources/projects.rb +80 -0
- data/lib/openlayer/resources/storage/presigned_url.rb +38 -0
- data/lib/openlayer/resources/storage.rb +18 -0
- data/lib/openlayer/version.rb +1 -1
- data/lib/openlayer.rb +96 -12
- data/manifest.yaml +15 -0
- data/rbi/openlayer/client.rbi +58 -0
- data/rbi/openlayer/errors.rbi +205 -0
- data/rbi/openlayer/file_part.rbi +37 -0
- data/rbi/openlayer/internal/transport/base_client.rbi +293 -0
- data/rbi/openlayer/internal/transport/pooled_net_requester.rbi +79 -0
- data/rbi/openlayer/internal/type/array_of.rbi +104 -0
- data/rbi/openlayer/internal/type/base_model.rbi +304 -0
- data/rbi/openlayer/internal/type/base_page.rbi +42 -0
- data/rbi/openlayer/internal/type/boolean.rbi +58 -0
- data/rbi/openlayer/internal/type/converter.rbi +216 -0
- data/rbi/openlayer/internal/type/enum.rbi +82 -0
- data/rbi/openlayer/internal/type/file_input.rbi +59 -0
- data/rbi/openlayer/internal/type/hash_of.rbi +104 -0
- data/rbi/openlayer/internal/type/request_parameters.rbi +29 -0
- data/rbi/openlayer/internal/type/union.rbi +128 -0
- data/rbi/openlayer/internal/type/unknown.rbi +58 -0
- data/rbi/openlayer/internal/util.rbi +487 -0
- data/rbi/openlayer/internal.rbi +18 -0
- data/rbi/openlayer/models/commit_retrieve_params.rbi +27 -0
- data/rbi/openlayer/models/commit_retrieve_response.rbi +393 -0
- data/rbi/openlayer/models/commits/test_result_list_params.rbi +214 -0
- data/rbi/openlayer/models/commits/test_result_list_response.rbi +1256 -0
- data/rbi/openlayer/models/inference_pipeline_delete_params.rbi +30 -0
- data/rbi/openlayer/models/inference_pipeline_retrieve_params.rbi +101 -0
- data/rbi/openlayer/models/inference_pipeline_retrieve_response.rbi +1022 -0
- data/rbi/openlayer/models/inference_pipeline_update_params.rbi +67 -0
- data/rbi/openlayer/models/inference_pipeline_update_response.rbi +1018 -0
- data/rbi/openlayer/models/inference_pipelines/data_stream_params.rbi +750 -0
- data/rbi/openlayer/models/inference_pipelines/data_stream_response.rbi +73 -0
- data/rbi/openlayer/models/inference_pipelines/row_update_params.rbi +153 -0
- data/rbi/openlayer/models/inference_pipelines/row_update_response.rbi +73 -0
- data/rbi/openlayer/models/inference_pipelines/test_result_list_params.rbi +216 -0
- data/rbi/openlayer/models/inference_pipelines/test_result_list_response.rbi +1258 -0
- data/rbi/openlayer/models/project_create_params.rbi +99 -0
- data/rbi/openlayer/models/project_create_response.rbi +401 -0
- data/rbi/openlayer/models/project_list_params.rbi +121 -0
- data/rbi/openlayer/models/project_list_response.rbi +442 -0
- data/rbi/openlayer/models/projects/commit_create_params.rbi +125 -0
- data/rbi/openlayer/models/projects/commit_create_response.rbi +409 -0
- data/rbi/openlayer/models/projects/commit_list_params.rbi +62 -0
- data/rbi/openlayer/models/projects/commit_list_response.rbi +454 -0
- data/rbi/openlayer/models/projects/inference_pipeline_create_params.rbi +560 -0
- data/rbi/openlayer/models/projects/inference_pipeline_create_response.rbi +1027 -0
- data/rbi/openlayer/models/projects/inference_pipeline_list_params.rbi +73 -0
- data/rbi/openlayer/models/projects/inference_pipeline_list_response.rbi +1070 -0
- data/rbi/openlayer/models/projects/test_create_params.rbi +940 -0
- data/rbi/openlayer/models/projects/test_create_response.rbi +1026 -0
- data/rbi/openlayer/models/projects/test_list_params.rbi +165 -0
- data/rbi/openlayer/models/projects/test_list_response.rbi +1067 -0
- data/rbi/openlayer/models/projects/test_update_params.rbi +699 -0
- data/rbi/openlayer/models/projects/test_update_response.rbi +43 -0
- data/rbi/openlayer/models/storage/presigned_url_create_params.rbi +45 -0
- data/rbi/openlayer/models/storage/presigned_url_create_response.rbi +55 -0
- data/rbi/openlayer/models.rbi +26 -0
- data/rbi/openlayer/request_options.rbi +59 -0
- data/rbi/openlayer/resources/commits/test_results.rbi +45 -0
- data/rbi/openlayer/resources/commits.rbi +29 -0
- data/rbi/openlayer/resources/inference_pipelines/data.rbi +41 -0
- data/rbi/openlayer/resources/inference_pipelines/rows.rbi +40 -0
- data/rbi/openlayer/resources/inference_pipelines/test_results.rbi +46 -0
- data/rbi/openlayer/resources/inference_pipelines.rbi +79 -0
- data/rbi/openlayer/resources/projects/commits.rbi +60 -0
- data/rbi/openlayer/resources/projects/inference_pipelines.rbi +69 -0
- data/rbi/openlayer/resources/projects/tests.rbi +123 -0
- data/rbi/openlayer/resources/projects.rbi +64 -0
- data/rbi/openlayer/resources/storage/presigned_url.rbi +28 -0
- data/rbi/openlayer/resources/storage.rbi +15 -0
- data/rbi/openlayer/version.rbi +5 -0
- data/sig/openlayer/client.rbs +32 -0
- data/sig/openlayer/errors.rbs +117 -0
- data/sig/openlayer/file_part.rbs +21 -0
- data/sig/openlayer/internal/transport/base_client.rbs +131 -0
- data/sig/openlayer/internal/transport/pooled_net_requester.rbs +45 -0
- data/sig/openlayer/internal/type/array_of.rbs +48 -0
- data/sig/openlayer/internal/type/base_model.rbs +102 -0
- data/sig/openlayer/internal/type/base_page.rbs +24 -0
- data/sig/openlayer/internal/type/boolean.rbs +26 -0
- data/sig/openlayer/internal/type/converter.rbs +79 -0
- data/sig/openlayer/internal/type/enum.rbs +32 -0
- data/sig/openlayer/internal/type/file_input.rbs +25 -0
- data/sig/openlayer/internal/type/hash_of.rbs +48 -0
- data/sig/openlayer/internal/type/request_parameters.rbs +19 -0
- data/sig/openlayer/internal/type/union.rbs +52 -0
- data/sig/openlayer/internal/type/unknown.rbs +26 -0
- data/sig/openlayer/internal/util.rbs +185 -0
- data/sig/openlayer/internal.rbs +9 -0
- data/sig/openlayer/models/commit_retrieve_params.rbs +15 -0
- data/sig/openlayer/models/commit_retrieve_response.rbs +209 -0
- data/sig/openlayer/models/commits/test_result_list_params.rbs +91 -0
- data/sig/openlayer/models/commits/test_result_list_response.rbs +529 -0
- data/sig/openlayer/models/inference_pipeline_delete_params.rbs +15 -0
- data/sig/openlayer/models/inference_pipeline_retrieve_params.rbs +41 -0
- data/sig/openlayer/models/inference_pipeline_retrieve_response.rbs +493 -0
- data/sig/openlayer/models/inference_pipeline_update_params.rbs +34 -0
- data/sig/openlayer/models/inference_pipeline_update_response.rbs +493 -0
- data/sig/openlayer/models/inference_pipelines/data_stream_params.rbs +386 -0
- data/sig/openlayer/models/inference_pipelines/data_stream_response.rbs +32 -0
- data/sig/openlayer/models/inference_pipelines/row_update_params.rbs +75 -0
- data/sig/openlayer/models/inference_pipelines/row_update_response.rbs +32 -0
- data/sig/openlayer/models/inference_pipelines/test_result_list_params.rbs +84 -0
- data/sig/openlayer/models/inference_pipelines/test_result_list_response.rbs +529 -0
- data/sig/openlayer/models/project_create_params.rbs +53 -0
- data/sig/openlayer/models/project_create_response.rbs +210 -0
- data/sig/openlayer/models/project_list_params.rbs +68 -0
- data/sig/openlayer/models/project_list_response.rbs +225 -0
- data/sig/openlayer/models/projects/commit_create_params.rbs +82 -0
- data/sig/openlayer/models/projects/commit_create_response.rbs +211 -0
- data/sig/openlayer/models/projects/commit_list_params.rbs +34 -0
- data/sig/openlayer/models/projects/commit_list_response.rbs +228 -0
- data/sig/openlayer/models/projects/inference_pipeline_create_params.rbs +308 -0
- data/sig/openlayer/models/projects/inference_pipeline_create_response.rbs +495 -0
- data/sig/openlayer/models/projects/inference_pipeline_list_params.rbs +40 -0
- data/sig/openlayer/models/projects/inference_pipeline_list_response.rbs +512 -0
- data/sig/openlayer/models/projects/test_create_params.rbs +388 -0
- data/sig/openlayer/models/projects/test_create_response.rbs +427 -0
- data/sig/openlayer/models/projects/test_list_params.rbs +85 -0
- data/sig/openlayer/models/projects/test_list_response.rbs +442 -0
- data/sig/openlayer/models/projects/test_update_params.rbs +275 -0
- data/sig/openlayer/models/projects/test_update_response.rbs +25 -0
- data/sig/openlayer/models/storage/presigned_url_create_params.rbs +25 -0
- data/sig/openlayer/models/storage/presigned_url_create_response.rbs +22 -0
- data/sig/openlayer/models.rbs +21 -0
- data/sig/openlayer/request_options.rbs +34 -0
- data/sig/openlayer/resources/commits/test_results.rbs +19 -0
- data/sig/openlayer/resources/commits.rbs +14 -0
- data/sig/openlayer/resources/inference_pipelines/data.rbs +16 -0
- data/sig/openlayer/resources/inference_pipelines/rows.rbs +17 -0
- data/sig/openlayer/resources/inference_pipelines/test_results.rbs +18 -0
- data/sig/openlayer/resources/inference_pipelines.rbs +32 -0
- data/sig/openlayer/resources/projects/commits.rbs +25 -0
- data/sig/openlayer/resources/projects/inference_pipelines.rbs +26 -0
- data/sig/openlayer/resources/projects/tests.rbs +45 -0
- data/sig/openlayer/resources/projects.rbs +28 -0
- data/sig/openlayer/resources/storage/presigned_url.rbs +14 -0
- data/sig/openlayer/resources/storage.rbs +9 -0
- data/sig/openlayer/version.rbs +3 -0
- metadata +223 -91
- data/.env +0 -0
- data/.rspec +0 -3
- data/.rubocop.yml +0 -13
- data/LICENSE +0 -21
- data/Rakefile +0 -12
- data/examples/staging/.DS_Store +0 -0
- data/examples/staging/commit.yaml +0 -2
- data/examples/staging/model/model_config.yaml +0 -12
- data/examples/staging/validation/dataset_config.yaml +0 -12
- data/lib/openlayer/error.rb +0 -5
- data/lib/openlayer/inference_pipeline.rb +0 -36
- data/lib/openlayer/object.rb +0 -28
- data/lib/openlayer/objects/project.rb +0 -185
- data/lib/openlayer/objects/project_version.rb +0 -89
- data/lib/openlayer/services/s3_presigned_client.rb +0 -47
- data/lib/openlayer/services/tar_file_helper.rb +0 -55
- data/openlayer.gemspec +0 -45
- data/sig/openlayer.rbs +0 -4
@@ -0,0 +1,43 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
module Models
|
5
|
+
module Projects
|
6
|
+
class TestUpdateResponse < Openlayer::Internal::Type::BaseModel
|
7
|
+
OrHash =
|
8
|
+
T.type_alias do
|
9
|
+
T.any(
|
10
|
+
Openlayer::Models::Projects::TestUpdateResponse,
|
11
|
+
Openlayer::Internal::AnyHash
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
sig { returns(T.nilable(String)) }
|
16
|
+
attr_reader :task_result_id
|
17
|
+
|
18
|
+
sig { params(task_result_id: String).void }
|
19
|
+
attr_writer :task_result_id
|
20
|
+
|
21
|
+
sig { returns(T.nilable(String)) }
|
22
|
+
attr_reader :task_result_url
|
23
|
+
|
24
|
+
sig { params(task_result_url: String).void }
|
25
|
+
attr_writer :task_result_url
|
26
|
+
|
27
|
+
sig do
|
28
|
+
params(task_result_id: String, task_result_url: String).returns(
|
29
|
+
T.attached_class
|
30
|
+
)
|
31
|
+
end
|
32
|
+
def self.new(task_result_id: nil, task_result_url: nil)
|
33
|
+
end
|
34
|
+
|
35
|
+
sig do
|
36
|
+
override.returns({ task_result_id: String, task_result_url: String })
|
37
|
+
end
|
38
|
+
def to_hash
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
module Models
|
5
|
+
module Storage
|
6
|
+
class PresignedURLCreateParams < Openlayer::Internal::Type::BaseModel
|
7
|
+
extend Openlayer::Internal::Type::RequestParameters::Converter
|
8
|
+
include Openlayer::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
Openlayer::Storage::PresignedURLCreateParams,
|
14
|
+
Openlayer::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# The name of the object.
|
19
|
+
sig { returns(String) }
|
20
|
+
attr_accessor :object_name
|
21
|
+
|
22
|
+
sig do
|
23
|
+
params(
|
24
|
+
object_name: String,
|
25
|
+
request_options: Openlayer::RequestOptions::OrHash
|
26
|
+
).returns(T.attached_class)
|
27
|
+
end
|
28
|
+
def self.new(
|
29
|
+
# The name of the object.
|
30
|
+
object_name:,
|
31
|
+
request_options: {}
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
35
|
+
sig do
|
36
|
+
override.returns(
|
37
|
+
{ object_name: String, request_options: Openlayer::RequestOptions }
|
38
|
+
)
|
39
|
+
end
|
40
|
+
def to_hash
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
module Models
|
5
|
+
module Storage
|
6
|
+
class PresignedURLCreateResponse < Openlayer::Internal::Type::BaseModel
|
7
|
+
OrHash =
|
8
|
+
T.type_alias do
|
9
|
+
T.any(
|
10
|
+
Openlayer::Models::Storage::PresignedURLCreateResponse,
|
11
|
+
Openlayer::Internal::AnyHash
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
# The storage URI to send back to the backend after the upload was completed.
|
16
|
+
sig { returns(String) }
|
17
|
+
attr_accessor :storage_uri
|
18
|
+
|
19
|
+
# The presigned url.
|
20
|
+
sig { returns(String) }
|
21
|
+
attr_accessor :url
|
22
|
+
|
23
|
+
# Fields to include in the body of the upload. Only needed by s3
|
24
|
+
sig { returns(T.nilable(T.anything)) }
|
25
|
+
attr_reader :fields
|
26
|
+
|
27
|
+
sig { params(fields: T.anything).void }
|
28
|
+
attr_writer :fields
|
29
|
+
|
30
|
+
sig do
|
31
|
+
params(storage_uri: String, url: String, fields: T.anything).returns(
|
32
|
+
T.attached_class
|
33
|
+
)
|
34
|
+
end
|
35
|
+
def self.new(
|
36
|
+
# The storage URI to send back to the backend after the upload was completed.
|
37
|
+
storage_uri:,
|
38
|
+
# The presigned url.
|
39
|
+
url:,
|
40
|
+
# Fields to include in the body of the upload. Only needed by s3
|
41
|
+
fields: nil
|
42
|
+
)
|
43
|
+
end
|
44
|
+
|
45
|
+
sig do
|
46
|
+
override.returns(
|
47
|
+
{ storage_uri: String, url: String, fields: T.anything }
|
48
|
+
)
|
49
|
+
end
|
50
|
+
def to_hash
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
CommitRetrieveParams = Openlayer::Models::CommitRetrieveParams
|
5
|
+
|
6
|
+
Commits = Openlayer::Models::Commits
|
7
|
+
|
8
|
+
InferencePipelineDeleteParams =
|
9
|
+
Openlayer::Models::InferencePipelineDeleteParams
|
10
|
+
|
11
|
+
InferencePipelineRetrieveParams =
|
12
|
+
Openlayer::Models::InferencePipelineRetrieveParams
|
13
|
+
|
14
|
+
InferencePipelines = Openlayer::Models::InferencePipelines
|
15
|
+
|
16
|
+
InferencePipelineUpdateParams =
|
17
|
+
Openlayer::Models::InferencePipelineUpdateParams
|
18
|
+
|
19
|
+
ProjectCreateParams = Openlayer::Models::ProjectCreateParams
|
20
|
+
|
21
|
+
ProjectListParams = Openlayer::Models::ProjectListParams
|
22
|
+
|
23
|
+
Projects = Openlayer::Models::Projects
|
24
|
+
|
25
|
+
Storage = Openlayer::Models::Storage
|
26
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
# Specify HTTP behaviour to use for a specific request. These options supplement
|
5
|
+
# or override those provided at the client level.
|
6
|
+
#
|
7
|
+
# When making a request, you can pass an actual {RequestOptions} instance, or
|
8
|
+
# simply pass a Hash with symbol keys matching the attributes on this class.
|
9
|
+
class RequestOptions < Openlayer::Internal::Type::BaseModel
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(Openlayer::RequestOptions, Openlayer::Internal::AnyHash)
|
13
|
+
end
|
14
|
+
|
15
|
+
# @api private
|
16
|
+
sig { params(opts: Openlayer::RequestOptions::OrHash).void }
|
17
|
+
def self.validate!(opts)
|
18
|
+
end
|
19
|
+
|
20
|
+
# Idempotency key to send with request and all associated retries. Will only be
|
21
|
+
# sent for write requests.
|
22
|
+
sig { returns(T.nilable(String)) }
|
23
|
+
attr_accessor :idempotency_key
|
24
|
+
|
25
|
+
# Extra query params to send with the request. These are `.merge`’d into any
|
26
|
+
# `query` given at the client level.
|
27
|
+
sig do
|
28
|
+
returns(
|
29
|
+
T.nilable(T::Hash[String, T.nilable(T.any(T::Array[String], String))])
|
30
|
+
)
|
31
|
+
end
|
32
|
+
attr_accessor :extra_query
|
33
|
+
|
34
|
+
# Extra headers to send with the request. These are `.merged`’d into any
|
35
|
+
# `extra_headers` given at the client level.
|
36
|
+
sig { returns(T.nilable(T::Hash[String, T.nilable(String)])) }
|
37
|
+
attr_accessor :extra_headers
|
38
|
+
|
39
|
+
# Extra data to send with the request. These are deep merged into any data
|
40
|
+
# generated as part of the normal request.
|
41
|
+
sig { returns(T.nilable(T.anything)) }
|
42
|
+
attr_accessor :extra_body
|
43
|
+
|
44
|
+
# Maximum number of retries to attempt after a failed initial request.
|
45
|
+
sig { returns(T.nilable(Integer)) }
|
46
|
+
attr_accessor :max_retries
|
47
|
+
|
48
|
+
# Request timeout in seconds.
|
49
|
+
sig { returns(T.nilable(Float)) }
|
50
|
+
attr_accessor :timeout
|
51
|
+
|
52
|
+
# Returns a new instance of RequestOptions.
|
53
|
+
sig do
|
54
|
+
params(values: Openlayer::Internal::AnyHash).returns(T.attached_class)
|
55
|
+
end
|
56
|
+
def self.new(values = {})
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
module Resources
|
5
|
+
class Commits
|
6
|
+
class TestResults
|
7
|
+
# List the test results for a project commit (project version).
|
8
|
+
sig do
|
9
|
+
params(
|
10
|
+
project_version_id: String,
|
11
|
+
include_archived: T::Boolean,
|
12
|
+
page: Integer,
|
13
|
+
per_page: Integer,
|
14
|
+
status: Openlayer::Commits::TestResultListParams::Status::OrSymbol,
|
15
|
+
type: Openlayer::Commits::TestResultListParams::Type::OrSymbol,
|
16
|
+
request_options: Openlayer::RequestOptions::OrHash
|
17
|
+
).returns(Openlayer::Models::Commits::TestResultListResponse)
|
18
|
+
end
|
19
|
+
def list(
|
20
|
+
# The project version (commit) id.
|
21
|
+
project_version_id,
|
22
|
+
# Filter for archived tests.
|
23
|
+
include_archived: nil,
|
24
|
+
# The page to return in a paginated query.
|
25
|
+
page: nil,
|
26
|
+
# Maximum number of items to return per page.
|
27
|
+
per_page: nil,
|
28
|
+
# Filter list of test results by status. Available statuses are `running`,
|
29
|
+
# `passing`, `failing`, `skipped`, and `error`.
|
30
|
+
status: nil,
|
31
|
+
# Filter objects by test type. Available types are `integrity`, `consistency`,
|
32
|
+
# `performance`, `fairness`, and `robustness`.
|
33
|
+
type: nil,
|
34
|
+
request_options: {}
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
38
|
+
# @api private
|
39
|
+
sig { params(client: Openlayer::Client).returns(T.attached_class) }
|
40
|
+
def self.new(client:)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
module Resources
|
5
|
+
class Commits
|
6
|
+
sig { returns(Openlayer::Resources::Commits::TestResults) }
|
7
|
+
attr_reader :test_results
|
8
|
+
|
9
|
+
# Retrieve a project version (commit) by its id.
|
10
|
+
sig do
|
11
|
+
params(
|
12
|
+
project_version_id: String,
|
13
|
+
request_options: Openlayer::RequestOptions::OrHash
|
14
|
+
).returns(Openlayer::Models::CommitRetrieveResponse)
|
15
|
+
end
|
16
|
+
def retrieve(
|
17
|
+
# The project version (commit) id.
|
18
|
+
project_version_id,
|
19
|
+
request_options: {}
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
# @api private
|
24
|
+
sig { params(client: Openlayer::Client).returns(T.attached_class) }
|
25
|
+
def self.new(client:)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
module Resources
|
5
|
+
class InferencePipelines
|
6
|
+
class Data
|
7
|
+
# Publish an inference data point to an inference pipeline.
|
8
|
+
sig do
|
9
|
+
params(
|
10
|
+
inference_pipeline_id: String,
|
11
|
+
config:
|
12
|
+
T.any(
|
13
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::LlmData::OrHash,
|
14
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TabularClassificationData::OrHash,
|
15
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TabularRegressionData::OrHash,
|
16
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TextClassificationData::OrHash
|
17
|
+
),
|
18
|
+
rows: T::Array[T::Hash[Symbol, T.anything]],
|
19
|
+
request_options: Openlayer::RequestOptions::OrHash
|
20
|
+
).returns(Openlayer::Models::InferencePipelines::DataStreamResponse)
|
21
|
+
end
|
22
|
+
def stream(
|
23
|
+
# The inference pipeline id (a UUID).
|
24
|
+
inference_pipeline_id,
|
25
|
+
# Configuration for the data stream. Depends on your **Openlayer project task
|
26
|
+
# type**.
|
27
|
+
config:,
|
28
|
+
# A list of inference data points with inputs and outputs
|
29
|
+
rows:,
|
30
|
+
request_options: {}
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
34
|
+
# @api private
|
35
|
+
sig { params(client: Openlayer::Client).returns(T.attached_class) }
|
36
|
+
def self.new(client:)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
module Resources
|
5
|
+
class InferencePipelines
|
6
|
+
class Rows
|
7
|
+
# Update an inference data point in an inference pipeline.
|
8
|
+
sig do
|
9
|
+
params(
|
10
|
+
inference_pipeline_id: String,
|
11
|
+
inference_id: String,
|
12
|
+
row: T.anything,
|
13
|
+
config:
|
14
|
+
T.nilable(
|
15
|
+
Openlayer::InferencePipelines::RowUpdateParams::Config::OrHash
|
16
|
+
),
|
17
|
+
request_options: Openlayer::RequestOptions::OrHash
|
18
|
+
).returns(Openlayer::Models::InferencePipelines::RowUpdateResponse)
|
19
|
+
end
|
20
|
+
def update(
|
21
|
+
# Path param: The inference pipeline id (a UUID).
|
22
|
+
inference_pipeline_id,
|
23
|
+
# Query param: Specify the inference id as a query param.
|
24
|
+
inference_id:,
|
25
|
+
# Body param:
|
26
|
+
row:,
|
27
|
+
# Body param:
|
28
|
+
config: nil,
|
29
|
+
request_options: {}
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
# @api private
|
34
|
+
sig { params(client: Openlayer::Client).returns(T.attached_class) }
|
35
|
+
def self.new(client:)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
module Resources
|
5
|
+
class InferencePipelines
|
6
|
+
class TestResults
|
7
|
+
# List the latest test results for an inference pipeline.
|
8
|
+
sig do
|
9
|
+
params(
|
10
|
+
inference_pipeline_id: String,
|
11
|
+
page: Integer,
|
12
|
+
per_page: Integer,
|
13
|
+
status:
|
14
|
+
Openlayer::InferencePipelines::TestResultListParams::Status::OrSymbol,
|
15
|
+
type:
|
16
|
+
Openlayer::InferencePipelines::TestResultListParams::Type::OrSymbol,
|
17
|
+
request_options: Openlayer::RequestOptions::OrHash
|
18
|
+
).returns(
|
19
|
+
Openlayer::Models::InferencePipelines::TestResultListResponse
|
20
|
+
)
|
21
|
+
end
|
22
|
+
def list(
|
23
|
+
# The inference pipeline id (a UUID).
|
24
|
+
inference_pipeline_id,
|
25
|
+
# The page to return in a paginated query.
|
26
|
+
page: nil,
|
27
|
+
# Maximum number of items to return per page.
|
28
|
+
per_page: nil,
|
29
|
+
# Filter list of test results by status. Available statuses are `running`,
|
30
|
+
# `passing`, `failing`, `skipped`, and `error`.
|
31
|
+
status: nil,
|
32
|
+
# Filter objects by test type. Available types are `integrity`, `consistency`,
|
33
|
+
# `performance`, `fairness`, and `robustness`.
|
34
|
+
type: nil,
|
35
|
+
request_options: {}
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
# @api private
|
40
|
+
sig { params(client: Openlayer::Client).returns(T.attached_class) }
|
41
|
+
def self.new(client:)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
module Resources
|
5
|
+
class InferencePipelines
|
6
|
+
sig { returns(Openlayer::Resources::InferencePipelines::Data) }
|
7
|
+
attr_reader :data
|
8
|
+
|
9
|
+
sig { returns(Openlayer::Resources::InferencePipelines::Rows) }
|
10
|
+
attr_reader :rows
|
11
|
+
|
12
|
+
sig { returns(Openlayer::Resources::InferencePipelines::TestResults) }
|
13
|
+
attr_reader :test_results
|
14
|
+
|
15
|
+
# Retrieve inference pipeline.
|
16
|
+
sig do
|
17
|
+
params(
|
18
|
+
inference_pipeline_id: String,
|
19
|
+
expand:
|
20
|
+
T::Array[
|
21
|
+
Openlayer::InferencePipelineRetrieveParams::Expand::OrSymbol
|
22
|
+
],
|
23
|
+
request_options: Openlayer::RequestOptions::OrHash
|
24
|
+
).returns(Openlayer::Models::InferencePipelineRetrieveResponse)
|
25
|
+
end
|
26
|
+
def retrieve(
|
27
|
+
# The inference pipeline id (a UUID).
|
28
|
+
inference_pipeline_id,
|
29
|
+
# Expand specific nested objects.
|
30
|
+
expand: nil,
|
31
|
+
request_options: {}
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
35
|
+
# Update inference pipeline.
|
36
|
+
sig do
|
37
|
+
params(
|
38
|
+
inference_pipeline_id: String,
|
39
|
+
description: T.nilable(String),
|
40
|
+
name: String,
|
41
|
+
reference_dataset_uri: T.nilable(String),
|
42
|
+
request_options: Openlayer::RequestOptions::OrHash
|
43
|
+
).returns(Openlayer::Models::InferencePipelineUpdateResponse)
|
44
|
+
end
|
45
|
+
def update(
|
46
|
+
# The inference pipeline id (a UUID).
|
47
|
+
inference_pipeline_id,
|
48
|
+
# The inference pipeline description.
|
49
|
+
description: nil,
|
50
|
+
# The inference pipeline name.
|
51
|
+
name: nil,
|
52
|
+
# The storage uri of your reference dataset. We recommend using the Python SDK or
|
53
|
+
# the UI to handle your reference dataset updates.
|
54
|
+
reference_dataset_uri: nil,
|
55
|
+
request_options: {}
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Delete inference pipeline.
|
60
|
+
sig do
|
61
|
+
params(
|
62
|
+
inference_pipeline_id: String,
|
63
|
+
request_options: Openlayer::RequestOptions::OrHash
|
64
|
+
).void
|
65
|
+
end
|
66
|
+
def delete(
|
67
|
+
# The inference pipeline id (a UUID).
|
68
|
+
inference_pipeline_id,
|
69
|
+
request_options: {}
|
70
|
+
)
|
71
|
+
end
|
72
|
+
|
73
|
+
# @api private
|
74
|
+
sig { params(client: Openlayer::Client).returns(T.attached_class) }
|
75
|
+
def self.new(client:)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
module Resources
|
5
|
+
class Projects
|
6
|
+
class Commits
|
7
|
+
# Create a new commit (project version) in a project.
|
8
|
+
sig do
|
9
|
+
params(
|
10
|
+
project_id: String,
|
11
|
+
commit: Openlayer::Projects::CommitCreateParams::Commit::OrHash,
|
12
|
+
storage_uri: String,
|
13
|
+
archived: T.nilable(T::Boolean),
|
14
|
+
deployment_status: String,
|
15
|
+
request_options: Openlayer::RequestOptions::OrHash
|
16
|
+
).returns(Openlayer::Models::Projects::CommitCreateResponse)
|
17
|
+
end
|
18
|
+
def create(
|
19
|
+
# The project id.
|
20
|
+
project_id,
|
21
|
+
# The details of a commit (project version).
|
22
|
+
commit:,
|
23
|
+
# The storage URI where the commit bundle is stored.
|
24
|
+
storage_uri:,
|
25
|
+
# Whether the commit is archived.
|
26
|
+
archived: nil,
|
27
|
+
# The deployment status associated with the commit's model.
|
28
|
+
deployment_status: nil,
|
29
|
+
request_options: {}
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
# List the commits (project versions) in a project.
|
34
|
+
sig do
|
35
|
+
params(
|
36
|
+
project_id: String,
|
37
|
+
page: Integer,
|
38
|
+
per_page: Integer,
|
39
|
+
request_options: Openlayer::RequestOptions::OrHash
|
40
|
+
).returns(Openlayer::Models::Projects::CommitListResponse)
|
41
|
+
end
|
42
|
+
def list(
|
43
|
+
# The project id.
|
44
|
+
project_id,
|
45
|
+
# The page to return in a paginated query.
|
46
|
+
page: nil,
|
47
|
+
# Maximum number of items to return per page.
|
48
|
+
per_page: nil,
|
49
|
+
request_options: {}
|
50
|
+
)
|
51
|
+
end
|
52
|
+
|
53
|
+
# @api private
|
54
|
+
sig { params(client: Openlayer::Client).returns(T.attached_class) }
|
55
|
+
def self.new(client:)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
module Resources
|
5
|
+
class Projects
|
6
|
+
class InferencePipelines
|
7
|
+
# Create an inference pipeline in a project.
|
8
|
+
sig do
|
9
|
+
params(
|
10
|
+
project_id: String,
|
11
|
+
description: T.nilable(String),
|
12
|
+
name: String,
|
13
|
+
project:
|
14
|
+
T.nilable(
|
15
|
+
Openlayer::Projects::InferencePipelineCreateParams::Project::OrHash
|
16
|
+
),
|
17
|
+
workspace:
|
18
|
+
T.nilable(
|
19
|
+
Openlayer::Projects::InferencePipelineCreateParams::Workspace::OrHash
|
20
|
+
),
|
21
|
+
request_options: Openlayer::RequestOptions::OrHash
|
22
|
+
).returns(
|
23
|
+
Openlayer::Models::Projects::InferencePipelineCreateResponse
|
24
|
+
)
|
25
|
+
end
|
26
|
+
def create(
|
27
|
+
# The project id.
|
28
|
+
project_id,
|
29
|
+
# The inference pipeline description.
|
30
|
+
description:,
|
31
|
+
# The inference pipeline name.
|
32
|
+
name:,
|
33
|
+
project: nil,
|
34
|
+
workspace: nil,
|
35
|
+
request_options: {}
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
# List the inference pipelines in a project.
|
40
|
+
sig do
|
41
|
+
params(
|
42
|
+
project_id: String,
|
43
|
+
name: String,
|
44
|
+
page: Integer,
|
45
|
+
per_page: Integer,
|
46
|
+
request_options: Openlayer::RequestOptions::OrHash
|
47
|
+
).returns(Openlayer::Models::Projects::InferencePipelineListResponse)
|
48
|
+
end
|
49
|
+
def list(
|
50
|
+
# The project id.
|
51
|
+
project_id,
|
52
|
+
# Filter list of items by name.
|
53
|
+
name: nil,
|
54
|
+
# The page to return in a paginated query.
|
55
|
+
page: nil,
|
56
|
+
# Maximum number of items to return per page.
|
57
|
+
per_page: nil,
|
58
|
+
request_options: {}
|
59
|
+
)
|
60
|
+
end
|
61
|
+
|
62
|
+
# @api private
|
63
|
+
sig { params(client: Openlayer::Client).returns(T.attached_class) }
|
64
|
+
def self.new(client:)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|