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,750 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Openlayer
|
4
|
+
module Models
|
5
|
+
module InferencePipelines
|
6
|
+
class DataStreamParams < 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::InferencePipelines::DataStreamParams,
|
14
|
+
Openlayer::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Configuration for the data stream. Depends on your **Openlayer project task
|
19
|
+
# type**.
|
20
|
+
sig do
|
21
|
+
returns(
|
22
|
+
T.any(
|
23
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::LlmData,
|
24
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TabularClassificationData,
|
25
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TabularRegressionData,
|
26
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TextClassificationData
|
27
|
+
)
|
28
|
+
)
|
29
|
+
end
|
30
|
+
attr_accessor :config
|
31
|
+
|
32
|
+
# A list of inference data points with inputs and outputs
|
33
|
+
sig { returns(T::Array[T::Hash[Symbol, T.anything]]) }
|
34
|
+
attr_accessor :rows
|
35
|
+
|
36
|
+
sig do
|
37
|
+
params(
|
38
|
+
config:
|
39
|
+
T.any(
|
40
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::LlmData::OrHash,
|
41
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TabularClassificationData::OrHash,
|
42
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TabularRegressionData::OrHash,
|
43
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TextClassificationData::OrHash
|
44
|
+
),
|
45
|
+
rows: T::Array[T::Hash[Symbol, T.anything]],
|
46
|
+
request_options: Openlayer::RequestOptions::OrHash
|
47
|
+
).returns(T.attached_class)
|
48
|
+
end
|
49
|
+
def self.new(
|
50
|
+
# Configuration for the data stream. Depends on your **Openlayer project task
|
51
|
+
# type**.
|
52
|
+
config:,
|
53
|
+
# A list of inference data points with inputs and outputs
|
54
|
+
rows:,
|
55
|
+
request_options: {}
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
sig do
|
60
|
+
override.returns(
|
61
|
+
{
|
62
|
+
config:
|
63
|
+
T.any(
|
64
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::LlmData,
|
65
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TabularClassificationData,
|
66
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TabularRegressionData,
|
67
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TextClassificationData
|
68
|
+
),
|
69
|
+
rows: T::Array[T::Hash[Symbol, T.anything]],
|
70
|
+
request_options: Openlayer::RequestOptions
|
71
|
+
}
|
72
|
+
)
|
73
|
+
end
|
74
|
+
def to_hash
|
75
|
+
end
|
76
|
+
|
77
|
+
# Configuration for the data stream. Depends on your **Openlayer project task
|
78
|
+
# type**.
|
79
|
+
module Config
|
80
|
+
extend Openlayer::Internal::Type::Union
|
81
|
+
|
82
|
+
Variants =
|
83
|
+
T.type_alias do
|
84
|
+
T.any(
|
85
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::LlmData,
|
86
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TabularClassificationData,
|
87
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TabularRegressionData,
|
88
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TextClassificationData
|
89
|
+
)
|
90
|
+
end
|
91
|
+
|
92
|
+
class LlmData < Openlayer::Internal::Type::BaseModel
|
93
|
+
OrHash =
|
94
|
+
T.type_alias do
|
95
|
+
T.any(
|
96
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::LlmData,
|
97
|
+
Openlayer::Internal::AnyHash
|
98
|
+
)
|
99
|
+
end
|
100
|
+
|
101
|
+
# Name of the column with the model outputs.
|
102
|
+
sig { returns(String) }
|
103
|
+
attr_accessor :output_column_name
|
104
|
+
|
105
|
+
# Name of the column with the context retrieved. Applies to RAG use cases.
|
106
|
+
# Providing the context enables RAG-specific metrics.
|
107
|
+
sig { returns(T.nilable(String)) }
|
108
|
+
attr_reader :context_column_name
|
109
|
+
|
110
|
+
sig { params(context_column_name: String).void }
|
111
|
+
attr_writer :context_column_name
|
112
|
+
|
113
|
+
# Name of the column with the cost associated with each row.
|
114
|
+
sig { returns(T.nilable(String)) }
|
115
|
+
attr_reader :cost_column_name
|
116
|
+
|
117
|
+
sig { params(cost_column_name: String).void }
|
118
|
+
attr_writer :cost_column_name
|
119
|
+
|
120
|
+
# Name of the column with the ground truths.
|
121
|
+
sig { returns(T.nilable(String)) }
|
122
|
+
attr_reader :ground_truth_column_name
|
123
|
+
|
124
|
+
sig { params(ground_truth_column_name: String).void }
|
125
|
+
attr_writer :ground_truth_column_name
|
126
|
+
|
127
|
+
# Name of the column with the inference ids. This is useful if you want to update
|
128
|
+
# rows at a later point in time. If not provided, a unique id is generated by
|
129
|
+
# Openlayer.
|
130
|
+
sig { returns(T.nilable(String)) }
|
131
|
+
attr_reader :inference_id_column_name
|
132
|
+
|
133
|
+
sig { params(inference_id_column_name: String).void }
|
134
|
+
attr_writer :inference_id_column_name
|
135
|
+
|
136
|
+
# Array of input variable names. Each input variable should be a dataset column.
|
137
|
+
sig { returns(T.nilable(T::Array[String])) }
|
138
|
+
attr_reader :input_variable_names
|
139
|
+
|
140
|
+
sig { params(input_variable_names: T::Array[String]).void }
|
141
|
+
attr_writer :input_variable_names
|
142
|
+
|
143
|
+
# Name of the column with the latencies.
|
144
|
+
sig { returns(T.nilable(String)) }
|
145
|
+
attr_reader :latency_column_name
|
146
|
+
|
147
|
+
sig { params(latency_column_name: String).void }
|
148
|
+
attr_writer :latency_column_name
|
149
|
+
|
150
|
+
# Object with metadata.
|
151
|
+
sig { returns(T.nilable(T.anything)) }
|
152
|
+
attr_reader :metadata
|
153
|
+
|
154
|
+
sig { params(metadata: T.anything).void }
|
155
|
+
attr_writer :metadata
|
156
|
+
|
157
|
+
# Name of the column with the total number of tokens.
|
158
|
+
sig { returns(T.nilable(String)) }
|
159
|
+
attr_accessor :num_of_token_column_name
|
160
|
+
|
161
|
+
# Prompt for the LLM.
|
162
|
+
sig do
|
163
|
+
returns(
|
164
|
+
T.nilable(
|
165
|
+
T::Array[
|
166
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::LlmData::Prompt
|
167
|
+
]
|
168
|
+
)
|
169
|
+
)
|
170
|
+
end
|
171
|
+
attr_reader :prompt
|
172
|
+
|
173
|
+
sig do
|
174
|
+
params(
|
175
|
+
prompt:
|
176
|
+
T::Array[
|
177
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::LlmData::Prompt::OrHash
|
178
|
+
]
|
179
|
+
).void
|
180
|
+
end
|
181
|
+
attr_writer :prompt
|
182
|
+
|
183
|
+
# Name of the column with the questions. Applies to RAG use cases. Providing the
|
184
|
+
# question enables RAG-specific metrics.
|
185
|
+
sig { returns(T.nilable(String)) }
|
186
|
+
attr_reader :question_column_name
|
187
|
+
|
188
|
+
sig { params(question_column_name: String).void }
|
189
|
+
attr_writer :question_column_name
|
190
|
+
|
191
|
+
# Name of the column with the session id.
|
192
|
+
sig { returns(T.nilable(String)) }
|
193
|
+
attr_accessor :session_id_column_name
|
194
|
+
|
195
|
+
# Name of the column with the timestamps. Timestamps must be in UNIX sec format.
|
196
|
+
# If not provided, the upload timestamp is used.
|
197
|
+
sig { returns(T.nilable(String)) }
|
198
|
+
attr_reader :timestamp_column_name
|
199
|
+
|
200
|
+
sig { params(timestamp_column_name: String).void }
|
201
|
+
attr_writer :timestamp_column_name
|
202
|
+
|
203
|
+
# Name of the column with the user id.
|
204
|
+
sig { returns(T.nilable(String)) }
|
205
|
+
attr_accessor :user_id_column_name
|
206
|
+
|
207
|
+
sig do
|
208
|
+
params(
|
209
|
+
output_column_name: String,
|
210
|
+
context_column_name: String,
|
211
|
+
cost_column_name: String,
|
212
|
+
ground_truth_column_name: String,
|
213
|
+
inference_id_column_name: String,
|
214
|
+
input_variable_names: T::Array[String],
|
215
|
+
latency_column_name: String,
|
216
|
+
metadata: T.anything,
|
217
|
+
num_of_token_column_name: T.nilable(String),
|
218
|
+
prompt:
|
219
|
+
T::Array[
|
220
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::LlmData::Prompt::OrHash
|
221
|
+
],
|
222
|
+
question_column_name: String,
|
223
|
+
session_id_column_name: T.nilable(String),
|
224
|
+
timestamp_column_name: String,
|
225
|
+
user_id_column_name: T.nilable(String)
|
226
|
+
).returns(T.attached_class)
|
227
|
+
end
|
228
|
+
def self.new(
|
229
|
+
# Name of the column with the model outputs.
|
230
|
+
output_column_name:,
|
231
|
+
# Name of the column with the context retrieved. Applies to RAG use cases.
|
232
|
+
# Providing the context enables RAG-specific metrics.
|
233
|
+
context_column_name: nil,
|
234
|
+
# Name of the column with the cost associated with each row.
|
235
|
+
cost_column_name: nil,
|
236
|
+
# Name of the column with the ground truths.
|
237
|
+
ground_truth_column_name: nil,
|
238
|
+
# Name of the column with the inference ids. This is useful if you want to update
|
239
|
+
# rows at a later point in time. If not provided, a unique id is generated by
|
240
|
+
# Openlayer.
|
241
|
+
inference_id_column_name: nil,
|
242
|
+
# Array of input variable names. Each input variable should be a dataset column.
|
243
|
+
input_variable_names: nil,
|
244
|
+
# Name of the column with the latencies.
|
245
|
+
latency_column_name: nil,
|
246
|
+
# Object with metadata.
|
247
|
+
metadata: nil,
|
248
|
+
# Name of the column with the total number of tokens.
|
249
|
+
num_of_token_column_name: nil,
|
250
|
+
# Prompt for the LLM.
|
251
|
+
prompt: nil,
|
252
|
+
# Name of the column with the questions. Applies to RAG use cases. Providing the
|
253
|
+
# question enables RAG-specific metrics.
|
254
|
+
question_column_name: nil,
|
255
|
+
# Name of the column with the session id.
|
256
|
+
session_id_column_name: nil,
|
257
|
+
# Name of the column with the timestamps. Timestamps must be in UNIX sec format.
|
258
|
+
# If not provided, the upload timestamp is used.
|
259
|
+
timestamp_column_name: nil,
|
260
|
+
# Name of the column with the user id.
|
261
|
+
user_id_column_name: nil
|
262
|
+
)
|
263
|
+
end
|
264
|
+
|
265
|
+
sig do
|
266
|
+
override.returns(
|
267
|
+
{
|
268
|
+
output_column_name: String,
|
269
|
+
context_column_name: String,
|
270
|
+
cost_column_name: String,
|
271
|
+
ground_truth_column_name: String,
|
272
|
+
inference_id_column_name: String,
|
273
|
+
input_variable_names: T::Array[String],
|
274
|
+
latency_column_name: String,
|
275
|
+
metadata: T.anything,
|
276
|
+
num_of_token_column_name: T.nilable(String),
|
277
|
+
prompt:
|
278
|
+
T::Array[
|
279
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::LlmData::Prompt
|
280
|
+
],
|
281
|
+
question_column_name: String,
|
282
|
+
session_id_column_name: T.nilable(String),
|
283
|
+
timestamp_column_name: String,
|
284
|
+
user_id_column_name: T.nilable(String)
|
285
|
+
}
|
286
|
+
)
|
287
|
+
end
|
288
|
+
def to_hash
|
289
|
+
end
|
290
|
+
|
291
|
+
class Prompt < Openlayer::Internal::Type::BaseModel
|
292
|
+
OrHash =
|
293
|
+
T.type_alias do
|
294
|
+
T.any(
|
295
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::LlmData::Prompt,
|
296
|
+
Openlayer::Internal::AnyHash
|
297
|
+
)
|
298
|
+
end
|
299
|
+
|
300
|
+
# Content of the prompt.
|
301
|
+
sig { returns(T.nilable(String)) }
|
302
|
+
attr_reader :content
|
303
|
+
|
304
|
+
sig { params(content: String).void }
|
305
|
+
attr_writer :content
|
306
|
+
|
307
|
+
# Role of the prompt.
|
308
|
+
sig { returns(T.nilable(String)) }
|
309
|
+
attr_reader :role
|
310
|
+
|
311
|
+
sig { params(role: String).void }
|
312
|
+
attr_writer :role
|
313
|
+
|
314
|
+
sig do
|
315
|
+
params(content: String, role: String).returns(T.attached_class)
|
316
|
+
end
|
317
|
+
def self.new(
|
318
|
+
# Content of the prompt.
|
319
|
+
content: nil,
|
320
|
+
# Role of the prompt.
|
321
|
+
role: nil
|
322
|
+
)
|
323
|
+
end
|
324
|
+
|
325
|
+
sig { override.returns({ content: String, role: String }) }
|
326
|
+
def to_hash
|
327
|
+
end
|
328
|
+
end
|
329
|
+
end
|
330
|
+
|
331
|
+
class TabularClassificationData < Openlayer::Internal::Type::BaseModel
|
332
|
+
OrHash =
|
333
|
+
T.type_alias do
|
334
|
+
T.any(
|
335
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TabularClassificationData,
|
336
|
+
Openlayer::Internal::AnyHash
|
337
|
+
)
|
338
|
+
end
|
339
|
+
|
340
|
+
# List of class names indexed by label integer in the dataset. E.g. ["Retained",
|
341
|
+
# "Exited"] when 0, 1 are in your label column.
|
342
|
+
sig { returns(T::Array[String]) }
|
343
|
+
attr_accessor :class_names
|
344
|
+
|
345
|
+
# Array with the names of all categorical features in the dataset. E.g. ["Age",
|
346
|
+
# "Geography"].
|
347
|
+
sig { returns(T.nilable(T::Array[String])) }
|
348
|
+
attr_reader :categorical_feature_names
|
349
|
+
|
350
|
+
sig { params(categorical_feature_names: T::Array[String]).void }
|
351
|
+
attr_writer :categorical_feature_names
|
352
|
+
|
353
|
+
# Array with all input feature names.
|
354
|
+
sig { returns(T.nilable(T::Array[String])) }
|
355
|
+
attr_reader :feature_names
|
356
|
+
|
357
|
+
sig { params(feature_names: T::Array[String]).void }
|
358
|
+
attr_writer :feature_names
|
359
|
+
|
360
|
+
# Name of the column with the inference ids. This is useful if you want to update
|
361
|
+
# rows at a later point in time. If not provided, a unique id is generated by
|
362
|
+
# Openlayer.
|
363
|
+
sig { returns(T.nilable(String)) }
|
364
|
+
attr_reader :inference_id_column_name
|
365
|
+
|
366
|
+
sig { params(inference_id_column_name: String).void }
|
367
|
+
attr_writer :inference_id_column_name
|
368
|
+
|
369
|
+
# Name of the column with the labels. The data in this column must be
|
370
|
+
# **zero-indexed integers**, matching the list provided in `classNames`.
|
371
|
+
sig { returns(T.nilable(String)) }
|
372
|
+
attr_reader :label_column_name
|
373
|
+
|
374
|
+
sig { params(label_column_name: String).void }
|
375
|
+
attr_writer :label_column_name
|
376
|
+
|
377
|
+
# Name of the column with the latencies.
|
378
|
+
sig { returns(T.nilable(String)) }
|
379
|
+
attr_reader :latency_column_name
|
380
|
+
|
381
|
+
sig { params(latency_column_name: String).void }
|
382
|
+
attr_writer :latency_column_name
|
383
|
+
|
384
|
+
# Object with metadata.
|
385
|
+
sig { returns(T.nilable(T.anything)) }
|
386
|
+
attr_reader :metadata
|
387
|
+
|
388
|
+
sig { params(metadata: T.anything).void }
|
389
|
+
attr_writer :metadata
|
390
|
+
|
391
|
+
# Name of the column with the model's predictions as **zero-indexed integers**.
|
392
|
+
sig { returns(T.nilable(String)) }
|
393
|
+
attr_reader :predictions_column_name
|
394
|
+
|
395
|
+
sig { params(predictions_column_name: String).void }
|
396
|
+
attr_writer :predictions_column_name
|
397
|
+
|
398
|
+
# Name of the column with the model's predictions as **lists of class
|
399
|
+
# probabilities**.
|
400
|
+
sig { returns(T.nilable(String)) }
|
401
|
+
attr_reader :prediction_scores_column_name
|
402
|
+
|
403
|
+
sig { params(prediction_scores_column_name: String).void }
|
404
|
+
attr_writer :prediction_scores_column_name
|
405
|
+
|
406
|
+
# Name of the column with the timestamps. Timestamps must be in UNIX sec format.
|
407
|
+
# If not provided, the upload timestamp is used.
|
408
|
+
sig { returns(T.nilable(String)) }
|
409
|
+
attr_reader :timestamp_column_name
|
410
|
+
|
411
|
+
sig { params(timestamp_column_name: String).void }
|
412
|
+
attr_writer :timestamp_column_name
|
413
|
+
|
414
|
+
sig do
|
415
|
+
params(
|
416
|
+
class_names: T::Array[String],
|
417
|
+
categorical_feature_names: T::Array[String],
|
418
|
+
feature_names: T::Array[String],
|
419
|
+
inference_id_column_name: String,
|
420
|
+
label_column_name: String,
|
421
|
+
latency_column_name: String,
|
422
|
+
metadata: T.anything,
|
423
|
+
predictions_column_name: String,
|
424
|
+
prediction_scores_column_name: String,
|
425
|
+
timestamp_column_name: String
|
426
|
+
).returns(T.attached_class)
|
427
|
+
end
|
428
|
+
def self.new(
|
429
|
+
# List of class names indexed by label integer in the dataset. E.g. ["Retained",
|
430
|
+
# "Exited"] when 0, 1 are in your label column.
|
431
|
+
class_names:,
|
432
|
+
# Array with the names of all categorical features in the dataset. E.g. ["Age",
|
433
|
+
# "Geography"].
|
434
|
+
categorical_feature_names: nil,
|
435
|
+
# Array with all input feature names.
|
436
|
+
feature_names: nil,
|
437
|
+
# Name of the column with the inference ids. This is useful if you want to update
|
438
|
+
# rows at a later point in time. If not provided, a unique id is generated by
|
439
|
+
# Openlayer.
|
440
|
+
inference_id_column_name: nil,
|
441
|
+
# Name of the column with the labels. The data in this column must be
|
442
|
+
# **zero-indexed integers**, matching the list provided in `classNames`.
|
443
|
+
label_column_name: nil,
|
444
|
+
# Name of the column with the latencies.
|
445
|
+
latency_column_name: nil,
|
446
|
+
# Object with metadata.
|
447
|
+
metadata: nil,
|
448
|
+
# Name of the column with the model's predictions as **zero-indexed integers**.
|
449
|
+
predictions_column_name: nil,
|
450
|
+
# Name of the column with the model's predictions as **lists of class
|
451
|
+
# probabilities**.
|
452
|
+
prediction_scores_column_name: nil,
|
453
|
+
# Name of the column with the timestamps. Timestamps must be in UNIX sec format.
|
454
|
+
# If not provided, the upload timestamp is used.
|
455
|
+
timestamp_column_name: nil
|
456
|
+
)
|
457
|
+
end
|
458
|
+
|
459
|
+
sig do
|
460
|
+
override.returns(
|
461
|
+
{
|
462
|
+
class_names: T::Array[String],
|
463
|
+
categorical_feature_names: T::Array[String],
|
464
|
+
feature_names: T::Array[String],
|
465
|
+
inference_id_column_name: String,
|
466
|
+
label_column_name: String,
|
467
|
+
latency_column_name: String,
|
468
|
+
metadata: T.anything,
|
469
|
+
predictions_column_name: String,
|
470
|
+
prediction_scores_column_name: String,
|
471
|
+
timestamp_column_name: String
|
472
|
+
}
|
473
|
+
)
|
474
|
+
end
|
475
|
+
def to_hash
|
476
|
+
end
|
477
|
+
end
|
478
|
+
|
479
|
+
class TabularRegressionData < Openlayer::Internal::Type::BaseModel
|
480
|
+
OrHash =
|
481
|
+
T.type_alias do
|
482
|
+
T.any(
|
483
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TabularRegressionData,
|
484
|
+
Openlayer::Internal::AnyHash
|
485
|
+
)
|
486
|
+
end
|
487
|
+
|
488
|
+
# Array with the names of all categorical features in the dataset. E.g. ["Gender",
|
489
|
+
# "Geography"].
|
490
|
+
sig { returns(T.nilable(T::Array[String])) }
|
491
|
+
attr_reader :categorical_feature_names
|
492
|
+
|
493
|
+
sig { params(categorical_feature_names: T::Array[String]).void }
|
494
|
+
attr_writer :categorical_feature_names
|
495
|
+
|
496
|
+
# Array with all input feature names.
|
497
|
+
sig { returns(T.nilable(T::Array[String])) }
|
498
|
+
attr_reader :feature_names
|
499
|
+
|
500
|
+
sig { params(feature_names: T::Array[String]).void }
|
501
|
+
attr_writer :feature_names
|
502
|
+
|
503
|
+
# Name of the column with the inference ids. This is useful if you want to update
|
504
|
+
# rows at a later point in time. If not provided, a unique id is generated by
|
505
|
+
# Openlayer.
|
506
|
+
sig { returns(T.nilable(String)) }
|
507
|
+
attr_reader :inference_id_column_name
|
508
|
+
|
509
|
+
sig { params(inference_id_column_name: String).void }
|
510
|
+
attr_writer :inference_id_column_name
|
511
|
+
|
512
|
+
# Name of the column with the latencies.
|
513
|
+
sig { returns(T.nilable(String)) }
|
514
|
+
attr_reader :latency_column_name
|
515
|
+
|
516
|
+
sig { params(latency_column_name: String).void }
|
517
|
+
attr_writer :latency_column_name
|
518
|
+
|
519
|
+
# Object with metadata.
|
520
|
+
sig { returns(T.nilable(T.anything)) }
|
521
|
+
attr_reader :metadata
|
522
|
+
|
523
|
+
sig { params(metadata: T.anything).void }
|
524
|
+
attr_writer :metadata
|
525
|
+
|
526
|
+
# Name of the column with the model's predictions.
|
527
|
+
sig { returns(T.nilable(String)) }
|
528
|
+
attr_reader :predictions_column_name
|
529
|
+
|
530
|
+
sig { params(predictions_column_name: String).void }
|
531
|
+
attr_writer :predictions_column_name
|
532
|
+
|
533
|
+
# Name of the column with the targets (ground truth values).
|
534
|
+
sig { returns(T.nilable(String)) }
|
535
|
+
attr_reader :target_column_name
|
536
|
+
|
537
|
+
sig { params(target_column_name: String).void }
|
538
|
+
attr_writer :target_column_name
|
539
|
+
|
540
|
+
# Name of the column with the timestamps. Timestamps must be in UNIX sec format.
|
541
|
+
# If not provided, the upload timestamp is used.
|
542
|
+
sig { returns(T.nilable(String)) }
|
543
|
+
attr_reader :timestamp_column_name
|
544
|
+
|
545
|
+
sig { params(timestamp_column_name: String).void }
|
546
|
+
attr_writer :timestamp_column_name
|
547
|
+
|
548
|
+
sig do
|
549
|
+
params(
|
550
|
+
categorical_feature_names: T::Array[String],
|
551
|
+
feature_names: T::Array[String],
|
552
|
+
inference_id_column_name: String,
|
553
|
+
latency_column_name: String,
|
554
|
+
metadata: T.anything,
|
555
|
+
predictions_column_name: String,
|
556
|
+
target_column_name: String,
|
557
|
+
timestamp_column_name: String
|
558
|
+
).returns(T.attached_class)
|
559
|
+
end
|
560
|
+
def self.new(
|
561
|
+
# Array with the names of all categorical features in the dataset. E.g. ["Gender",
|
562
|
+
# "Geography"].
|
563
|
+
categorical_feature_names: nil,
|
564
|
+
# Array with all input feature names.
|
565
|
+
feature_names: nil,
|
566
|
+
# Name of the column with the inference ids. This is useful if you want to update
|
567
|
+
# rows at a later point in time. If not provided, a unique id is generated by
|
568
|
+
# Openlayer.
|
569
|
+
inference_id_column_name: nil,
|
570
|
+
# Name of the column with the latencies.
|
571
|
+
latency_column_name: nil,
|
572
|
+
# Object with metadata.
|
573
|
+
metadata: nil,
|
574
|
+
# Name of the column with the model's predictions.
|
575
|
+
predictions_column_name: nil,
|
576
|
+
# Name of the column with the targets (ground truth values).
|
577
|
+
target_column_name: nil,
|
578
|
+
# Name of the column with the timestamps. Timestamps must be in UNIX sec format.
|
579
|
+
# If not provided, the upload timestamp is used.
|
580
|
+
timestamp_column_name: nil
|
581
|
+
)
|
582
|
+
end
|
583
|
+
|
584
|
+
sig do
|
585
|
+
override.returns(
|
586
|
+
{
|
587
|
+
categorical_feature_names: T::Array[String],
|
588
|
+
feature_names: T::Array[String],
|
589
|
+
inference_id_column_name: String,
|
590
|
+
latency_column_name: String,
|
591
|
+
metadata: T.anything,
|
592
|
+
predictions_column_name: String,
|
593
|
+
target_column_name: String,
|
594
|
+
timestamp_column_name: String
|
595
|
+
}
|
596
|
+
)
|
597
|
+
end
|
598
|
+
def to_hash
|
599
|
+
end
|
600
|
+
end
|
601
|
+
|
602
|
+
class TextClassificationData < Openlayer::Internal::Type::BaseModel
|
603
|
+
OrHash =
|
604
|
+
T.type_alias do
|
605
|
+
T.any(
|
606
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::TextClassificationData,
|
607
|
+
Openlayer::Internal::AnyHash
|
608
|
+
)
|
609
|
+
end
|
610
|
+
|
611
|
+
# List of class names indexed by label integer in the dataset. E.g. ["Retained",
|
612
|
+
# "Exited"] when 0, 1 are in your label column.
|
613
|
+
sig { returns(T::Array[String]) }
|
614
|
+
attr_accessor :class_names
|
615
|
+
|
616
|
+
# Name of the column with the inference ids. This is useful if you want to update
|
617
|
+
# rows at a later point in time. If not provided, a unique id is generated by
|
618
|
+
# Openlayer.
|
619
|
+
sig { returns(T.nilable(String)) }
|
620
|
+
attr_reader :inference_id_column_name
|
621
|
+
|
622
|
+
sig { params(inference_id_column_name: String).void }
|
623
|
+
attr_writer :inference_id_column_name
|
624
|
+
|
625
|
+
# Name of the column with the labels. The data in this column must be
|
626
|
+
# **zero-indexed integers**, matching the list provided in `classNames`.
|
627
|
+
sig { returns(T.nilable(String)) }
|
628
|
+
attr_reader :label_column_name
|
629
|
+
|
630
|
+
sig { params(label_column_name: String).void }
|
631
|
+
attr_writer :label_column_name
|
632
|
+
|
633
|
+
# Name of the column with the latencies.
|
634
|
+
sig { returns(T.nilable(String)) }
|
635
|
+
attr_reader :latency_column_name
|
636
|
+
|
637
|
+
sig { params(latency_column_name: String).void }
|
638
|
+
attr_writer :latency_column_name
|
639
|
+
|
640
|
+
# Object with metadata.
|
641
|
+
sig { returns(T.nilable(T.anything)) }
|
642
|
+
attr_reader :metadata
|
643
|
+
|
644
|
+
sig { params(metadata: T.anything).void }
|
645
|
+
attr_writer :metadata
|
646
|
+
|
647
|
+
# Name of the column with the model's predictions as **zero-indexed integers**.
|
648
|
+
sig { returns(T.nilable(String)) }
|
649
|
+
attr_reader :predictions_column_name
|
650
|
+
|
651
|
+
sig { params(predictions_column_name: String).void }
|
652
|
+
attr_writer :predictions_column_name
|
653
|
+
|
654
|
+
# Name of the column with the model's predictions as **lists of class
|
655
|
+
# probabilities**.
|
656
|
+
sig { returns(T.nilable(String)) }
|
657
|
+
attr_reader :prediction_scores_column_name
|
658
|
+
|
659
|
+
sig { params(prediction_scores_column_name: String).void }
|
660
|
+
attr_writer :prediction_scores_column_name
|
661
|
+
|
662
|
+
# Name of the column with the text data.
|
663
|
+
sig { returns(T.nilable(String)) }
|
664
|
+
attr_reader :text_column_name
|
665
|
+
|
666
|
+
sig { params(text_column_name: String).void }
|
667
|
+
attr_writer :text_column_name
|
668
|
+
|
669
|
+
# Name of the column with the timestamps. Timestamps must be in UNIX sec format.
|
670
|
+
# If not provided, the upload timestamp is used.
|
671
|
+
sig { returns(T.nilable(String)) }
|
672
|
+
attr_reader :timestamp_column_name
|
673
|
+
|
674
|
+
sig { params(timestamp_column_name: String).void }
|
675
|
+
attr_writer :timestamp_column_name
|
676
|
+
|
677
|
+
sig do
|
678
|
+
params(
|
679
|
+
class_names: T::Array[String],
|
680
|
+
inference_id_column_name: String,
|
681
|
+
label_column_name: String,
|
682
|
+
latency_column_name: String,
|
683
|
+
metadata: T.anything,
|
684
|
+
predictions_column_name: String,
|
685
|
+
prediction_scores_column_name: String,
|
686
|
+
text_column_name: String,
|
687
|
+
timestamp_column_name: String
|
688
|
+
).returns(T.attached_class)
|
689
|
+
end
|
690
|
+
def self.new(
|
691
|
+
# List of class names indexed by label integer in the dataset. E.g. ["Retained",
|
692
|
+
# "Exited"] when 0, 1 are in your label column.
|
693
|
+
class_names:,
|
694
|
+
# Name of the column with the inference ids. This is useful if you want to update
|
695
|
+
# rows at a later point in time. If not provided, a unique id is generated by
|
696
|
+
# Openlayer.
|
697
|
+
inference_id_column_name: nil,
|
698
|
+
# Name of the column with the labels. The data in this column must be
|
699
|
+
# **zero-indexed integers**, matching the list provided in `classNames`.
|
700
|
+
label_column_name: nil,
|
701
|
+
# Name of the column with the latencies.
|
702
|
+
latency_column_name: nil,
|
703
|
+
# Object with metadata.
|
704
|
+
metadata: nil,
|
705
|
+
# Name of the column with the model's predictions as **zero-indexed integers**.
|
706
|
+
predictions_column_name: nil,
|
707
|
+
# Name of the column with the model's predictions as **lists of class
|
708
|
+
# probabilities**.
|
709
|
+
prediction_scores_column_name: nil,
|
710
|
+
# Name of the column with the text data.
|
711
|
+
text_column_name: nil,
|
712
|
+
# Name of the column with the timestamps. Timestamps must be in UNIX sec format.
|
713
|
+
# If not provided, the upload timestamp is used.
|
714
|
+
timestamp_column_name: nil
|
715
|
+
)
|
716
|
+
end
|
717
|
+
|
718
|
+
sig do
|
719
|
+
override.returns(
|
720
|
+
{
|
721
|
+
class_names: T::Array[String],
|
722
|
+
inference_id_column_name: String,
|
723
|
+
label_column_name: String,
|
724
|
+
latency_column_name: String,
|
725
|
+
metadata: T.anything,
|
726
|
+
predictions_column_name: String,
|
727
|
+
prediction_scores_column_name: String,
|
728
|
+
text_column_name: String,
|
729
|
+
timestamp_column_name: String
|
730
|
+
}
|
731
|
+
)
|
732
|
+
end
|
733
|
+
def to_hash
|
734
|
+
end
|
735
|
+
end
|
736
|
+
|
737
|
+
sig do
|
738
|
+
override.returns(
|
739
|
+
T::Array[
|
740
|
+
Openlayer::InferencePipelines::DataStreamParams::Config::Variants
|
741
|
+
]
|
742
|
+
)
|
743
|
+
end
|
744
|
+
def self.variants
|
745
|
+
end
|
746
|
+
end
|
747
|
+
end
|
748
|
+
end
|
749
|
+
end
|
750
|
+
end
|