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.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +23 -0
  4. data/README.md +280 -39
  5. data/SECURITY.md +27 -0
  6. data/lib/openlayer/client.rb +64 -59
  7. data/lib/openlayer/errors.rb +228 -0
  8. data/lib/openlayer/file_part.rb +58 -0
  9. data/lib/openlayer/internal/transport/base_client.rb +567 -0
  10. data/lib/openlayer/internal/transport/pooled_net_requester.rb +198 -0
  11. data/lib/openlayer/internal/type/array_of.rb +168 -0
  12. data/lib/openlayer/internal/type/base_model.rb +531 -0
  13. data/lib/openlayer/internal/type/base_page.rb +55 -0
  14. data/lib/openlayer/internal/type/boolean.rb +77 -0
  15. data/lib/openlayer/internal/type/converter.rb +327 -0
  16. data/lib/openlayer/internal/type/enum.rb +131 -0
  17. data/lib/openlayer/internal/type/file_input.rb +111 -0
  18. data/lib/openlayer/internal/type/hash_of.rb +188 -0
  19. data/lib/openlayer/internal/type/request_parameters.rb +42 -0
  20. data/lib/openlayer/internal/type/union.rb +237 -0
  21. data/lib/openlayer/internal/type/unknown.rb +81 -0
  22. data/lib/openlayer/internal/util.rb +915 -0
  23. data/lib/openlayer/internal.rb +20 -0
  24. data/lib/openlayer/models/commit_retrieve_params.rb +14 -0
  25. data/lib/openlayer/models/commit_retrieve_response.rb +275 -0
  26. data/lib/openlayer/models/commits/test_result_list_params.rb +91 -0
  27. data/lib/openlayer/models/commits/test_result_list_response.rb +566 -0
  28. data/lib/openlayer/models/inference_pipeline_delete_params.rb +14 -0
  29. data/lib/openlayer/models/inference_pipeline_retrieve_params.rb +33 -0
  30. data/lib/openlayer/models/inference_pipeline_retrieve_response.rb +605 -0
  31. data/lib/openlayer/models/inference_pipeline_update_params.rb +42 -0
  32. data/lib/openlayer/models/inference_pipeline_update_response.rb +605 -0
  33. data/lib/openlayer/models/inference_pipelines/data_stream_params.rb +463 -0
  34. data/lib/openlayer/models/inference_pipelines/data_stream_response.rb +28 -0
  35. data/lib/openlayer/models/inference_pipelines/row_update_params.rb +90 -0
  36. data/lib/openlayer/models/inference_pipelines/row_update_response.rb +28 -0
  37. data/lib/openlayer/models/inference_pipelines/test_result_list_params.rb +83 -0
  38. data/lib/openlayer/models/inference_pipelines/test_result_list_response.rb +568 -0
  39. data/lib/openlayer/models/project_create_params.rb +51 -0
  40. data/lib/openlayer/models/project_create_response.rb +262 -0
  41. data/lib/openlayer/models/project_list_params.rb +59 -0
  42. data/lib/openlayer/models/project_list_response.rb +274 -0
  43. data/lib/openlayer/models/projects/commit_create_params.rb +61 -0
  44. data/lib/openlayer/models/projects/commit_create_response.rb +277 -0
  45. data/lib/openlayer/models/projects/commit_list_params.rb +32 -0
  46. data/lib/openlayer/models/projects/commit_list_response.rb +288 -0
  47. data/lib/openlayer/models/projects/inference_pipeline_create_params.rb +229 -0
  48. data/lib/openlayer/models/projects/inference_pipeline_create_response.rb +612 -0
  49. data/lib/openlayer/models/projects/inference_pipeline_list_params.rb +40 -0
  50. data/lib/openlayer/models/projects/inference_pipeline_list_response.rb +623 -0
  51. data/lib/openlayer/models/projects/test_create_params.rb +367 -0
  52. data/lib/openlayer/models/projects/test_create_response.rb +438 -0
  53. data/lib/openlayer/models/projects/test_list_params.rb +91 -0
  54. data/lib/openlayer/models/projects/test_list_response.rb +452 -0
  55. data/lib/openlayer/models/projects/test_update_params.rb +262 -0
  56. data/lib/openlayer/models/projects/test_update_response.rb +24 -0
  57. data/lib/openlayer/models/storage/presigned_url_create_params.rb +24 -0
  58. data/lib/openlayer/models/storage/presigned_url_create_response.rb +35 -0
  59. data/lib/openlayer/models.rb +61 -0
  60. data/lib/openlayer/request_options.rb +77 -0
  61. data/lib/openlayer/resources/commits/test_results.rb +51 -0
  62. data/lib/openlayer/resources/commits.rb +38 -0
  63. data/lib/openlayer/resources/inference_pipelines/data.rb +46 -0
  64. data/lib/openlayer/resources/inference_pipelines/rows.rb +46 -0
  65. data/lib/openlayer/resources/inference_pipelines/test_results.rb +49 -0
  66. data/lib/openlayer/resources/inference_pipelines.rb +101 -0
  67. data/lib/openlayer/resources/projects/commits.rb +72 -0
  68. data/lib/openlayer/resources/projects/inference_pipelines.rb +74 -0
  69. data/lib/openlayer/resources/projects/tests.rb +135 -0
  70. data/lib/openlayer/resources/projects.rb +80 -0
  71. data/lib/openlayer/resources/storage/presigned_url.rb +38 -0
  72. data/lib/openlayer/resources/storage.rb +18 -0
  73. data/lib/openlayer/version.rb +1 -1
  74. data/lib/openlayer.rb +96 -12
  75. data/manifest.yaml +15 -0
  76. data/rbi/openlayer/client.rbi +58 -0
  77. data/rbi/openlayer/errors.rbi +205 -0
  78. data/rbi/openlayer/file_part.rbi +37 -0
  79. data/rbi/openlayer/internal/transport/base_client.rbi +293 -0
  80. data/rbi/openlayer/internal/transport/pooled_net_requester.rbi +79 -0
  81. data/rbi/openlayer/internal/type/array_of.rbi +104 -0
  82. data/rbi/openlayer/internal/type/base_model.rbi +304 -0
  83. data/rbi/openlayer/internal/type/base_page.rbi +42 -0
  84. data/rbi/openlayer/internal/type/boolean.rbi +58 -0
  85. data/rbi/openlayer/internal/type/converter.rbi +216 -0
  86. data/rbi/openlayer/internal/type/enum.rbi +82 -0
  87. data/rbi/openlayer/internal/type/file_input.rbi +59 -0
  88. data/rbi/openlayer/internal/type/hash_of.rbi +104 -0
  89. data/rbi/openlayer/internal/type/request_parameters.rbi +29 -0
  90. data/rbi/openlayer/internal/type/union.rbi +128 -0
  91. data/rbi/openlayer/internal/type/unknown.rbi +58 -0
  92. data/rbi/openlayer/internal/util.rbi +487 -0
  93. data/rbi/openlayer/internal.rbi +18 -0
  94. data/rbi/openlayer/models/commit_retrieve_params.rbi +27 -0
  95. data/rbi/openlayer/models/commit_retrieve_response.rbi +393 -0
  96. data/rbi/openlayer/models/commits/test_result_list_params.rbi +214 -0
  97. data/rbi/openlayer/models/commits/test_result_list_response.rbi +1256 -0
  98. data/rbi/openlayer/models/inference_pipeline_delete_params.rbi +30 -0
  99. data/rbi/openlayer/models/inference_pipeline_retrieve_params.rbi +101 -0
  100. data/rbi/openlayer/models/inference_pipeline_retrieve_response.rbi +1022 -0
  101. data/rbi/openlayer/models/inference_pipeline_update_params.rbi +67 -0
  102. data/rbi/openlayer/models/inference_pipeline_update_response.rbi +1018 -0
  103. data/rbi/openlayer/models/inference_pipelines/data_stream_params.rbi +750 -0
  104. data/rbi/openlayer/models/inference_pipelines/data_stream_response.rbi +73 -0
  105. data/rbi/openlayer/models/inference_pipelines/row_update_params.rbi +153 -0
  106. data/rbi/openlayer/models/inference_pipelines/row_update_response.rbi +73 -0
  107. data/rbi/openlayer/models/inference_pipelines/test_result_list_params.rbi +216 -0
  108. data/rbi/openlayer/models/inference_pipelines/test_result_list_response.rbi +1258 -0
  109. data/rbi/openlayer/models/project_create_params.rbi +99 -0
  110. data/rbi/openlayer/models/project_create_response.rbi +401 -0
  111. data/rbi/openlayer/models/project_list_params.rbi +121 -0
  112. data/rbi/openlayer/models/project_list_response.rbi +442 -0
  113. data/rbi/openlayer/models/projects/commit_create_params.rbi +125 -0
  114. data/rbi/openlayer/models/projects/commit_create_response.rbi +409 -0
  115. data/rbi/openlayer/models/projects/commit_list_params.rbi +62 -0
  116. data/rbi/openlayer/models/projects/commit_list_response.rbi +454 -0
  117. data/rbi/openlayer/models/projects/inference_pipeline_create_params.rbi +560 -0
  118. data/rbi/openlayer/models/projects/inference_pipeline_create_response.rbi +1027 -0
  119. data/rbi/openlayer/models/projects/inference_pipeline_list_params.rbi +73 -0
  120. data/rbi/openlayer/models/projects/inference_pipeline_list_response.rbi +1070 -0
  121. data/rbi/openlayer/models/projects/test_create_params.rbi +940 -0
  122. data/rbi/openlayer/models/projects/test_create_response.rbi +1026 -0
  123. data/rbi/openlayer/models/projects/test_list_params.rbi +165 -0
  124. data/rbi/openlayer/models/projects/test_list_response.rbi +1067 -0
  125. data/rbi/openlayer/models/projects/test_update_params.rbi +699 -0
  126. data/rbi/openlayer/models/projects/test_update_response.rbi +43 -0
  127. data/rbi/openlayer/models/storage/presigned_url_create_params.rbi +45 -0
  128. data/rbi/openlayer/models/storage/presigned_url_create_response.rbi +55 -0
  129. data/rbi/openlayer/models.rbi +26 -0
  130. data/rbi/openlayer/request_options.rbi +59 -0
  131. data/rbi/openlayer/resources/commits/test_results.rbi +45 -0
  132. data/rbi/openlayer/resources/commits.rbi +29 -0
  133. data/rbi/openlayer/resources/inference_pipelines/data.rbi +41 -0
  134. data/rbi/openlayer/resources/inference_pipelines/rows.rbi +40 -0
  135. data/rbi/openlayer/resources/inference_pipelines/test_results.rbi +46 -0
  136. data/rbi/openlayer/resources/inference_pipelines.rbi +79 -0
  137. data/rbi/openlayer/resources/projects/commits.rbi +60 -0
  138. data/rbi/openlayer/resources/projects/inference_pipelines.rbi +69 -0
  139. data/rbi/openlayer/resources/projects/tests.rbi +123 -0
  140. data/rbi/openlayer/resources/projects.rbi +64 -0
  141. data/rbi/openlayer/resources/storage/presigned_url.rbi +28 -0
  142. data/rbi/openlayer/resources/storage.rbi +15 -0
  143. data/rbi/openlayer/version.rbi +5 -0
  144. data/sig/openlayer/client.rbs +32 -0
  145. data/sig/openlayer/errors.rbs +117 -0
  146. data/sig/openlayer/file_part.rbs +21 -0
  147. data/sig/openlayer/internal/transport/base_client.rbs +131 -0
  148. data/sig/openlayer/internal/transport/pooled_net_requester.rbs +45 -0
  149. data/sig/openlayer/internal/type/array_of.rbs +48 -0
  150. data/sig/openlayer/internal/type/base_model.rbs +102 -0
  151. data/sig/openlayer/internal/type/base_page.rbs +24 -0
  152. data/sig/openlayer/internal/type/boolean.rbs +26 -0
  153. data/sig/openlayer/internal/type/converter.rbs +79 -0
  154. data/sig/openlayer/internal/type/enum.rbs +32 -0
  155. data/sig/openlayer/internal/type/file_input.rbs +25 -0
  156. data/sig/openlayer/internal/type/hash_of.rbs +48 -0
  157. data/sig/openlayer/internal/type/request_parameters.rbs +19 -0
  158. data/sig/openlayer/internal/type/union.rbs +52 -0
  159. data/sig/openlayer/internal/type/unknown.rbs +26 -0
  160. data/sig/openlayer/internal/util.rbs +185 -0
  161. data/sig/openlayer/internal.rbs +9 -0
  162. data/sig/openlayer/models/commit_retrieve_params.rbs +15 -0
  163. data/sig/openlayer/models/commit_retrieve_response.rbs +209 -0
  164. data/sig/openlayer/models/commits/test_result_list_params.rbs +91 -0
  165. data/sig/openlayer/models/commits/test_result_list_response.rbs +529 -0
  166. data/sig/openlayer/models/inference_pipeline_delete_params.rbs +15 -0
  167. data/sig/openlayer/models/inference_pipeline_retrieve_params.rbs +41 -0
  168. data/sig/openlayer/models/inference_pipeline_retrieve_response.rbs +493 -0
  169. data/sig/openlayer/models/inference_pipeline_update_params.rbs +34 -0
  170. data/sig/openlayer/models/inference_pipeline_update_response.rbs +493 -0
  171. data/sig/openlayer/models/inference_pipelines/data_stream_params.rbs +386 -0
  172. data/sig/openlayer/models/inference_pipelines/data_stream_response.rbs +32 -0
  173. data/sig/openlayer/models/inference_pipelines/row_update_params.rbs +75 -0
  174. data/sig/openlayer/models/inference_pipelines/row_update_response.rbs +32 -0
  175. data/sig/openlayer/models/inference_pipelines/test_result_list_params.rbs +84 -0
  176. data/sig/openlayer/models/inference_pipelines/test_result_list_response.rbs +529 -0
  177. data/sig/openlayer/models/project_create_params.rbs +53 -0
  178. data/sig/openlayer/models/project_create_response.rbs +210 -0
  179. data/sig/openlayer/models/project_list_params.rbs +68 -0
  180. data/sig/openlayer/models/project_list_response.rbs +225 -0
  181. data/sig/openlayer/models/projects/commit_create_params.rbs +82 -0
  182. data/sig/openlayer/models/projects/commit_create_response.rbs +211 -0
  183. data/sig/openlayer/models/projects/commit_list_params.rbs +34 -0
  184. data/sig/openlayer/models/projects/commit_list_response.rbs +228 -0
  185. data/sig/openlayer/models/projects/inference_pipeline_create_params.rbs +308 -0
  186. data/sig/openlayer/models/projects/inference_pipeline_create_response.rbs +495 -0
  187. data/sig/openlayer/models/projects/inference_pipeline_list_params.rbs +40 -0
  188. data/sig/openlayer/models/projects/inference_pipeline_list_response.rbs +512 -0
  189. data/sig/openlayer/models/projects/test_create_params.rbs +388 -0
  190. data/sig/openlayer/models/projects/test_create_response.rbs +427 -0
  191. data/sig/openlayer/models/projects/test_list_params.rbs +85 -0
  192. data/sig/openlayer/models/projects/test_list_response.rbs +442 -0
  193. data/sig/openlayer/models/projects/test_update_params.rbs +275 -0
  194. data/sig/openlayer/models/projects/test_update_response.rbs +25 -0
  195. data/sig/openlayer/models/storage/presigned_url_create_params.rbs +25 -0
  196. data/sig/openlayer/models/storage/presigned_url_create_response.rbs +22 -0
  197. data/sig/openlayer/models.rbs +21 -0
  198. data/sig/openlayer/request_options.rbs +34 -0
  199. data/sig/openlayer/resources/commits/test_results.rbs +19 -0
  200. data/sig/openlayer/resources/commits.rbs +14 -0
  201. data/sig/openlayer/resources/inference_pipelines/data.rbs +16 -0
  202. data/sig/openlayer/resources/inference_pipelines/rows.rbs +17 -0
  203. data/sig/openlayer/resources/inference_pipelines/test_results.rbs +18 -0
  204. data/sig/openlayer/resources/inference_pipelines.rbs +32 -0
  205. data/sig/openlayer/resources/projects/commits.rbs +25 -0
  206. data/sig/openlayer/resources/projects/inference_pipelines.rbs +26 -0
  207. data/sig/openlayer/resources/projects/tests.rbs +45 -0
  208. data/sig/openlayer/resources/projects.rbs +28 -0
  209. data/sig/openlayer/resources/storage/presigned_url.rbs +14 -0
  210. data/sig/openlayer/resources/storage.rbs +9 -0
  211. data/sig/openlayer/version.rbs +3 -0
  212. metadata +223 -91
  213. data/.env +0 -0
  214. data/.rspec +0 -3
  215. data/.rubocop.yml +0 -13
  216. data/LICENSE +0 -21
  217. data/Rakefile +0 -12
  218. data/examples/staging/.DS_Store +0 -0
  219. data/examples/staging/commit.yaml +0 -2
  220. data/examples/staging/model/model_config.yaml +0 -12
  221. data/examples/staging/validation/dataset_config.yaml +0 -12
  222. data/lib/openlayer/error.rb +0 -5
  223. data/lib/openlayer/inference_pipeline.rb +0 -36
  224. data/lib/openlayer/object.rb +0 -28
  225. data/lib/openlayer/objects/project.rb +0 -185
  226. data/lib/openlayer/objects/project_version.rb +0 -89
  227. data/lib/openlayer/services/s3_presigned_client.rb +0 -47
  228. data/lib/openlayer/services/tar_file_helper.rb +0 -55
  229. data/openlayer.gemspec +0 -45
  230. data/sig/openlayer.rbs +0 -4
@@ -0,0 +1,463 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ module InferencePipelines
6
+ # @see Openlayer::Resources::InferencePipelines::Data#stream
7
+ class DataStreamParams < Openlayer::Internal::Type::BaseModel
8
+ extend Openlayer::Internal::Type::RequestParameters::Converter
9
+ include Openlayer::Internal::Type::RequestParameters
10
+
11
+ # @!attribute config
12
+ # Configuration for the data stream. Depends on your **Openlayer project task
13
+ # type**.
14
+ #
15
+ # @return [Openlayer::Models::InferencePipelines::DataStreamParams::Config::LlmData, Openlayer::Models::InferencePipelines::DataStreamParams::Config::TabularClassificationData, Openlayer::Models::InferencePipelines::DataStreamParams::Config::TabularRegressionData, Openlayer::Models::InferencePipelines::DataStreamParams::Config::TextClassificationData]
16
+ required :config, union: -> { Openlayer::InferencePipelines::DataStreamParams::Config }
17
+
18
+ # @!attribute rows
19
+ # A list of inference data points with inputs and outputs
20
+ #
21
+ # @return [Array<Hash{Symbol=>Object}>]
22
+ required :rows,
23
+ Openlayer::Internal::Type::ArrayOf[Openlayer::Internal::Type::HashOf[Openlayer::Internal::Type::Unknown]]
24
+
25
+ # @!method initialize(config:, rows:, request_options: {})
26
+ # Some parameter documentations has been truncated, see
27
+ # {Openlayer::Models::InferencePipelines::DataStreamParams} for more details.
28
+ #
29
+ # @param config [Openlayer::Models::InferencePipelines::DataStreamParams::Config::LlmData, Openlayer::Models::InferencePipelines::DataStreamParams::Config::TabularClassificationData, Openlayer::Models::InferencePipelines::DataStreamParams::Config::TabularRegressionData, Openlayer::Models::InferencePipelines::DataStreamParams::Config::TextClassificationData] Configuration for the data stream. Depends on your \*\*Openlayer project task
30
+ # type
31
+ #
32
+ # @param rows [Array<Hash{Symbol=>Object}>] A list of inference data points with inputs and outputs
33
+ #
34
+ # @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}]
35
+
36
+ # Configuration for the data stream. Depends on your **Openlayer project task
37
+ # type**.
38
+ module Config
39
+ extend Openlayer::Internal::Type::Union
40
+
41
+ variant -> { Openlayer::InferencePipelines::DataStreamParams::Config::LlmData }
42
+
43
+ variant -> { Openlayer::InferencePipelines::DataStreamParams::Config::TabularClassificationData }
44
+
45
+ variant -> { Openlayer::InferencePipelines::DataStreamParams::Config::TabularRegressionData }
46
+
47
+ variant -> { Openlayer::InferencePipelines::DataStreamParams::Config::TextClassificationData }
48
+
49
+ class LlmData < Openlayer::Internal::Type::BaseModel
50
+ # @!attribute output_column_name
51
+ # Name of the column with the model outputs.
52
+ #
53
+ # @return [String]
54
+ required :output_column_name, String, api_name: :outputColumnName
55
+
56
+ # @!attribute context_column_name
57
+ # Name of the column with the context retrieved. Applies to RAG use cases.
58
+ # Providing the context enables RAG-specific metrics.
59
+ #
60
+ # @return [String, nil]
61
+ optional :context_column_name, String, api_name: :contextColumnName
62
+
63
+ # @!attribute cost_column_name
64
+ # Name of the column with the cost associated with each row.
65
+ #
66
+ # @return [String, nil]
67
+ optional :cost_column_name, String, api_name: :costColumnName
68
+
69
+ # @!attribute ground_truth_column_name
70
+ # Name of the column with the ground truths.
71
+ #
72
+ # @return [String, nil]
73
+ optional :ground_truth_column_name, String, api_name: :groundTruthColumnName
74
+
75
+ # @!attribute inference_id_column_name
76
+ # Name of the column with the inference ids. This is useful if you want to update
77
+ # rows at a later point in time. If not provided, a unique id is generated by
78
+ # Openlayer.
79
+ #
80
+ # @return [String, nil]
81
+ optional :inference_id_column_name, String, api_name: :inferenceIdColumnName
82
+
83
+ # @!attribute input_variable_names
84
+ # Array of input variable names. Each input variable should be a dataset column.
85
+ #
86
+ # @return [Array<String>, nil]
87
+ optional :input_variable_names,
88
+ Openlayer::Internal::Type::ArrayOf[String],
89
+ api_name: :inputVariableNames
90
+
91
+ # @!attribute latency_column_name
92
+ # Name of the column with the latencies.
93
+ #
94
+ # @return [String, nil]
95
+ optional :latency_column_name, String, api_name: :latencyColumnName
96
+
97
+ # @!attribute metadata
98
+ # Object with metadata.
99
+ #
100
+ # @return [Object, nil]
101
+ optional :metadata, Openlayer::Internal::Type::Unknown
102
+
103
+ # @!attribute num_of_token_column_name
104
+ # Name of the column with the total number of tokens.
105
+ #
106
+ # @return [String, nil]
107
+ optional :num_of_token_column_name, String, api_name: :numOfTokenColumnName, nil?: true
108
+
109
+ # @!attribute prompt
110
+ # Prompt for the LLM.
111
+ #
112
+ # @return [Array<Openlayer::Models::InferencePipelines::DataStreamParams::Config::LlmData::Prompt>, nil]
113
+ optional :prompt,
114
+ -> { Openlayer::Internal::Type::ArrayOf[Openlayer::InferencePipelines::DataStreamParams::Config::LlmData::Prompt] }
115
+
116
+ # @!attribute question_column_name
117
+ # Name of the column with the questions. Applies to RAG use cases. Providing the
118
+ # question enables RAG-specific metrics.
119
+ #
120
+ # @return [String, nil]
121
+ optional :question_column_name, String, api_name: :questionColumnName
122
+
123
+ # @!attribute session_id_column_name
124
+ # Name of the column with the session id.
125
+ #
126
+ # @return [String, nil]
127
+ optional :session_id_column_name, String, api_name: :sessionIdColumnName, nil?: true
128
+
129
+ # @!attribute timestamp_column_name
130
+ # Name of the column with the timestamps. Timestamps must be in UNIX sec format.
131
+ # If not provided, the upload timestamp is used.
132
+ #
133
+ # @return [String, nil]
134
+ optional :timestamp_column_name, String, api_name: :timestampColumnName
135
+
136
+ # @!attribute user_id_column_name
137
+ # Name of the column with the user id.
138
+ #
139
+ # @return [String, nil]
140
+ optional :user_id_column_name, String, api_name: :userIdColumnName, nil?: true
141
+
142
+ # @!method initialize(output_column_name:, context_column_name: nil, cost_column_name: nil, ground_truth_column_name: nil, inference_id_column_name: nil, input_variable_names: nil, latency_column_name: nil, metadata: nil, num_of_token_column_name: nil, prompt: nil, question_column_name: nil, session_id_column_name: nil, timestamp_column_name: nil, user_id_column_name: nil)
143
+ # Some parameter documentations has been truncated, see
144
+ # {Openlayer::Models::InferencePipelines::DataStreamParams::Config::LlmData} for
145
+ # more details.
146
+ #
147
+ # @param output_column_name [String] Name of the column with the model outputs.
148
+ #
149
+ # @param context_column_name [String] Name of the column with the context retrieved. Applies to RAG use cases. Providi
150
+ #
151
+ # @param cost_column_name [String] Name of the column with the cost associated with each row.
152
+ #
153
+ # @param ground_truth_column_name [String] Name of the column with the ground truths.
154
+ #
155
+ # @param inference_id_column_name [String] Name of the column with the inference ids. This is useful if you want to update
156
+ #
157
+ # @param input_variable_names [Array<String>] Array of input variable names. Each input variable should be a dataset column.
158
+ #
159
+ # @param latency_column_name [String] Name of the column with the latencies.
160
+ #
161
+ # @param metadata [Object] Object with metadata.
162
+ #
163
+ # @param num_of_token_column_name [String, nil] Name of the column with the total number of tokens.
164
+ #
165
+ # @param prompt [Array<Openlayer::Models::InferencePipelines::DataStreamParams::Config::LlmData::Prompt>] Prompt for the LLM.
166
+ #
167
+ # @param question_column_name [String] Name of the column with the questions. Applies to RAG use cases. Providing the q
168
+ #
169
+ # @param session_id_column_name [String, nil] Name of the column with the session id.
170
+ #
171
+ # @param timestamp_column_name [String] Name of the column with the timestamps. Timestamps must be in UNIX sec format. I
172
+ #
173
+ # @param user_id_column_name [String, nil] Name of the column with the user id.
174
+
175
+ class Prompt < Openlayer::Internal::Type::BaseModel
176
+ # @!attribute content
177
+ # Content of the prompt.
178
+ #
179
+ # @return [String, nil]
180
+ optional :content, String
181
+
182
+ # @!attribute role
183
+ # Role of the prompt.
184
+ #
185
+ # @return [String, nil]
186
+ optional :role, String
187
+
188
+ # @!method initialize(content: nil, role: nil)
189
+ # @param content [String] Content of the prompt.
190
+ #
191
+ # @param role [String] Role of the prompt.
192
+ end
193
+ end
194
+
195
+ class TabularClassificationData < Openlayer::Internal::Type::BaseModel
196
+ # @!attribute class_names
197
+ # List of class names indexed by label integer in the dataset. E.g. ["Retained",
198
+ # "Exited"] when 0, 1 are in your label column.
199
+ #
200
+ # @return [Array<String>]
201
+ required :class_names, Openlayer::Internal::Type::ArrayOf[String], api_name: :classNames
202
+
203
+ # @!attribute categorical_feature_names
204
+ # Array with the names of all categorical features in the dataset. E.g. ["Age",
205
+ # "Geography"].
206
+ #
207
+ # @return [Array<String>, nil]
208
+ optional :categorical_feature_names,
209
+ Openlayer::Internal::Type::ArrayOf[String],
210
+ api_name: :categoricalFeatureNames
211
+
212
+ # @!attribute feature_names
213
+ # Array with all input feature names.
214
+ #
215
+ # @return [Array<String>, nil]
216
+ optional :feature_names, Openlayer::Internal::Type::ArrayOf[String], api_name: :featureNames
217
+
218
+ # @!attribute inference_id_column_name
219
+ # Name of the column with the inference ids. This is useful if you want to update
220
+ # rows at a later point in time. If not provided, a unique id is generated by
221
+ # Openlayer.
222
+ #
223
+ # @return [String, nil]
224
+ optional :inference_id_column_name, String, api_name: :inferenceIdColumnName
225
+
226
+ # @!attribute label_column_name
227
+ # Name of the column with the labels. The data in this column must be
228
+ # **zero-indexed integers**, matching the list provided in `classNames`.
229
+ #
230
+ # @return [String, nil]
231
+ optional :label_column_name, String, api_name: :labelColumnName
232
+
233
+ # @!attribute latency_column_name
234
+ # Name of the column with the latencies.
235
+ #
236
+ # @return [String, nil]
237
+ optional :latency_column_name, String, api_name: :latencyColumnName
238
+
239
+ # @!attribute metadata
240
+ # Object with metadata.
241
+ #
242
+ # @return [Object, nil]
243
+ optional :metadata, Openlayer::Internal::Type::Unknown
244
+
245
+ # @!attribute predictions_column_name
246
+ # Name of the column with the model's predictions as **zero-indexed integers**.
247
+ #
248
+ # @return [String, nil]
249
+ optional :predictions_column_name, String, api_name: :predictionsColumnName
250
+
251
+ # @!attribute prediction_scores_column_name
252
+ # Name of the column with the model's predictions as **lists of class
253
+ # probabilities**.
254
+ #
255
+ # @return [String, nil]
256
+ optional :prediction_scores_column_name, String, api_name: :predictionScoresColumnName
257
+
258
+ # @!attribute timestamp_column_name
259
+ # Name of the column with the timestamps. Timestamps must be in UNIX sec format.
260
+ # If not provided, the upload timestamp is used.
261
+ #
262
+ # @return [String, nil]
263
+ optional :timestamp_column_name, String, api_name: :timestampColumnName
264
+
265
+ # @!method initialize(class_names:, categorical_feature_names: nil, feature_names: nil, inference_id_column_name: nil, label_column_name: nil, latency_column_name: nil, metadata: nil, predictions_column_name: nil, prediction_scores_column_name: nil, timestamp_column_name: nil)
266
+ # Some parameter documentations has been truncated, see
267
+ # {Openlayer::Models::InferencePipelines::DataStreamParams::Config::TabularClassificationData}
268
+ # for more details.
269
+ #
270
+ # @param class_names [Array<String>] List of class names indexed by label integer in the dataset. E.g. ["Retained", "
271
+ #
272
+ # @param categorical_feature_names [Array<String>] Array with the names of all categorical features in the dataset. E.g. ["Age", "G
273
+ #
274
+ # @param feature_names [Array<String>] Array with all input feature names.
275
+ #
276
+ # @param inference_id_column_name [String] Name of the column with the inference ids. This is useful if you want to update
277
+ #
278
+ # @param label_column_name [String] Name of the column with the labels. The data in this column must be
279
+ # \*\*zero-index
280
+ #
281
+ # @param latency_column_name [String] Name of the column with the latencies.
282
+ #
283
+ # @param metadata [Object] Object with metadata.
284
+ #
285
+ # @param predictions_column_name [String] Name of the column with the model's predictions as **zero-indexed integers**.
286
+ #
287
+ # @param prediction_scores_column_name [String] Name of the column with the model's predictions as \*\*lists of class
288
+ # probabilitie
289
+ #
290
+ # @param timestamp_column_name [String] Name of the column with the timestamps. Timestamps must be in UNIX sec format. I
291
+ end
292
+
293
+ class TabularRegressionData < Openlayer::Internal::Type::BaseModel
294
+ # @!attribute categorical_feature_names
295
+ # Array with the names of all categorical features in the dataset. E.g. ["Gender",
296
+ # "Geography"].
297
+ #
298
+ # @return [Array<String>, nil]
299
+ optional :categorical_feature_names,
300
+ Openlayer::Internal::Type::ArrayOf[String],
301
+ api_name: :categoricalFeatureNames
302
+
303
+ # @!attribute feature_names
304
+ # Array with all input feature names.
305
+ #
306
+ # @return [Array<String>, nil]
307
+ optional :feature_names, Openlayer::Internal::Type::ArrayOf[String], api_name: :featureNames
308
+
309
+ # @!attribute inference_id_column_name
310
+ # Name of the column with the inference ids. This is useful if you want to update
311
+ # rows at a later point in time. If not provided, a unique id is generated by
312
+ # Openlayer.
313
+ #
314
+ # @return [String, nil]
315
+ optional :inference_id_column_name, String, api_name: :inferenceIdColumnName
316
+
317
+ # @!attribute latency_column_name
318
+ # Name of the column with the latencies.
319
+ #
320
+ # @return [String, nil]
321
+ optional :latency_column_name, String, api_name: :latencyColumnName
322
+
323
+ # @!attribute metadata
324
+ # Object with metadata.
325
+ #
326
+ # @return [Object, nil]
327
+ optional :metadata, Openlayer::Internal::Type::Unknown
328
+
329
+ # @!attribute predictions_column_name
330
+ # Name of the column with the model's predictions.
331
+ #
332
+ # @return [String, nil]
333
+ optional :predictions_column_name, String, api_name: :predictionsColumnName
334
+
335
+ # @!attribute target_column_name
336
+ # Name of the column with the targets (ground truth values).
337
+ #
338
+ # @return [String, nil]
339
+ optional :target_column_name, String, api_name: :targetColumnName
340
+
341
+ # @!attribute timestamp_column_name
342
+ # Name of the column with the timestamps. Timestamps must be in UNIX sec format.
343
+ # If not provided, the upload timestamp is used.
344
+ #
345
+ # @return [String, nil]
346
+ optional :timestamp_column_name, String, api_name: :timestampColumnName
347
+
348
+ # @!method initialize(categorical_feature_names: nil, feature_names: nil, inference_id_column_name: nil, latency_column_name: nil, metadata: nil, predictions_column_name: nil, target_column_name: nil, timestamp_column_name: nil)
349
+ # Some parameter documentations has been truncated, see
350
+ # {Openlayer::Models::InferencePipelines::DataStreamParams::Config::TabularRegressionData}
351
+ # for more details.
352
+ #
353
+ # @param categorical_feature_names [Array<String>] Array with the names of all categorical features in the dataset. E.g. ["Gender",
354
+ #
355
+ # @param feature_names [Array<String>] Array with all input feature names.
356
+ #
357
+ # @param inference_id_column_name [String] Name of the column with the inference ids. This is useful if you want to update
358
+ #
359
+ # @param latency_column_name [String] Name of the column with the latencies.
360
+ #
361
+ # @param metadata [Object] Object with metadata.
362
+ #
363
+ # @param predictions_column_name [String] Name of the column with the model's predictions.
364
+ #
365
+ # @param target_column_name [String] Name of the column with the targets (ground truth values).
366
+ #
367
+ # @param timestamp_column_name [String] Name of the column with the timestamps. Timestamps must be in UNIX sec format. I
368
+ end
369
+
370
+ class TextClassificationData < Openlayer::Internal::Type::BaseModel
371
+ # @!attribute class_names
372
+ # List of class names indexed by label integer in the dataset. E.g. ["Retained",
373
+ # "Exited"] when 0, 1 are in your label column.
374
+ #
375
+ # @return [Array<String>]
376
+ required :class_names, Openlayer::Internal::Type::ArrayOf[String], api_name: :classNames
377
+
378
+ # @!attribute inference_id_column_name
379
+ # Name of the column with the inference ids. This is useful if you want to update
380
+ # rows at a later point in time. If not provided, a unique id is generated by
381
+ # Openlayer.
382
+ #
383
+ # @return [String, nil]
384
+ optional :inference_id_column_name, String, api_name: :inferenceIdColumnName
385
+
386
+ # @!attribute label_column_name
387
+ # Name of the column with the labels. The data in this column must be
388
+ # **zero-indexed integers**, matching the list provided in `classNames`.
389
+ #
390
+ # @return [String, nil]
391
+ optional :label_column_name, String, api_name: :labelColumnName
392
+
393
+ # @!attribute latency_column_name
394
+ # Name of the column with the latencies.
395
+ #
396
+ # @return [String, nil]
397
+ optional :latency_column_name, String, api_name: :latencyColumnName
398
+
399
+ # @!attribute metadata
400
+ # Object with metadata.
401
+ #
402
+ # @return [Object, nil]
403
+ optional :metadata, Openlayer::Internal::Type::Unknown
404
+
405
+ # @!attribute predictions_column_name
406
+ # Name of the column with the model's predictions as **zero-indexed integers**.
407
+ #
408
+ # @return [String, nil]
409
+ optional :predictions_column_name, String, api_name: :predictionsColumnName
410
+
411
+ # @!attribute prediction_scores_column_name
412
+ # Name of the column with the model's predictions as **lists of class
413
+ # probabilities**.
414
+ #
415
+ # @return [String, nil]
416
+ optional :prediction_scores_column_name, String, api_name: :predictionScoresColumnName
417
+
418
+ # @!attribute text_column_name
419
+ # Name of the column with the text data.
420
+ #
421
+ # @return [String, nil]
422
+ optional :text_column_name, String, api_name: :textColumnName
423
+
424
+ # @!attribute timestamp_column_name
425
+ # Name of the column with the timestamps. Timestamps must be in UNIX sec format.
426
+ # If not provided, the upload timestamp is used.
427
+ #
428
+ # @return [String, nil]
429
+ optional :timestamp_column_name, String, api_name: :timestampColumnName
430
+
431
+ # @!method initialize(class_names:, inference_id_column_name: nil, label_column_name: nil, latency_column_name: nil, metadata: nil, predictions_column_name: nil, prediction_scores_column_name: nil, text_column_name: nil, timestamp_column_name: nil)
432
+ # Some parameter documentations has been truncated, see
433
+ # {Openlayer::Models::InferencePipelines::DataStreamParams::Config::TextClassificationData}
434
+ # for more details.
435
+ #
436
+ # @param class_names [Array<String>] List of class names indexed by label integer in the dataset. E.g. ["Retained", "
437
+ #
438
+ # @param inference_id_column_name [String] Name of the column with the inference ids. This is useful if you want to update
439
+ #
440
+ # @param label_column_name [String] Name of the column with the labels. The data in this column must be
441
+ # \*\*zero-index
442
+ #
443
+ # @param latency_column_name [String] Name of the column with the latencies.
444
+ #
445
+ # @param metadata [Object] Object with metadata.
446
+ #
447
+ # @param predictions_column_name [String] Name of the column with the model's predictions as **zero-indexed integers**.
448
+ #
449
+ # @param prediction_scores_column_name [String] Name of the column with the model's predictions as \*\*lists of class
450
+ # probabilitie
451
+ #
452
+ # @param text_column_name [String] Name of the column with the text data.
453
+ #
454
+ # @param timestamp_column_name [String] Name of the column with the timestamps. Timestamps must be in UNIX sec format. I
455
+ end
456
+
457
+ # @!method self.variants
458
+ # @return [Array(Openlayer::Models::InferencePipelines::DataStreamParams::Config::LlmData, Openlayer::Models::InferencePipelines::DataStreamParams::Config::TabularClassificationData, Openlayer::Models::InferencePipelines::DataStreamParams::Config::TabularRegressionData, Openlayer::Models::InferencePipelines::DataStreamParams::Config::TextClassificationData)]
459
+ end
460
+ end
461
+ end
462
+ end
463
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ module InferencePipelines
6
+ # @see Openlayer::Resources::InferencePipelines::Data#stream
7
+ class DataStreamResponse < Openlayer::Internal::Type::BaseModel
8
+ # @!attribute success
9
+ #
10
+ # @return [Boolean, Openlayer::Models::InferencePipelines::DataStreamResponse::Success]
11
+ required :success, enum: -> { Openlayer::Models::InferencePipelines::DataStreamResponse::Success }
12
+
13
+ # @!method initialize(success:)
14
+ # @param success [Boolean, Openlayer::Models::InferencePipelines::DataStreamResponse::Success]
15
+
16
+ # @see Openlayer::Models::InferencePipelines::DataStreamResponse#success
17
+ module Success
18
+ extend Openlayer::Internal::Type::Enum
19
+
20
+ TRUE = true
21
+
22
+ # @!method self.values
23
+ # @return [Array<Boolean>]
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ module InferencePipelines
6
+ # @see Openlayer::Resources::InferencePipelines::Rows#update
7
+ class RowUpdateParams < Openlayer::Internal::Type::BaseModel
8
+ extend Openlayer::Internal::Type::RequestParameters::Converter
9
+ include Openlayer::Internal::Type::RequestParameters
10
+
11
+ # @!attribute inference_id
12
+ # Specify the inference id as a query param.
13
+ #
14
+ # @return [String]
15
+ required :inference_id, String
16
+
17
+ # @!attribute row
18
+ #
19
+ # @return [Object]
20
+ required :row, Openlayer::Internal::Type::Unknown
21
+
22
+ # @!attribute config
23
+ #
24
+ # @return [Openlayer::Models::InferencePipelines::RowUpdateParams::Config, nil]
25
+ optional :config, -> { Openlayer::InferencePipelines::RowUpdateParams::Config }, nil?: true
26
+
27
+ # @!method initialize(inference_id:, row:, config: nil, request_options: {})
28
+ # @param inference_id [String] Specify the inference id as a query param.
29
+ #
30
+ # @param row [Object]
31
+ #
32
+ # @param config [Openlayer::Models::InferencePipelines::RowUpdateParams::Config, nil]
33
+ #
34
+ # @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}]
35
+
36
+ class Config < Openlayer::Internal::Type::BaseModel
37
+ # @!attribute ground_truth_column_name
38
+ # Name of the column with the ground truths.
39
+ #
40
+ # @return [String, nil]
41
+ optional :ground_truth_column_name, String, api_name: :groundTruthColumnName, nil?: true
42
+
43
+ # @!attribute human_feedback_column_name
44
+ # Name of the column with human feedback.
45
+ #
46
+ # @return [String, nil]
47
+ optional :human_feedback_column_name, String, api_name: :humanFeedbackColumnName, nil?: true
48
+
49
+ # @!attribute latency_column_name
50
+ # Name of the column with the latencies.
51
+ #
52
+ # @return [String, nil]
53
+ optional :latency_column_name, String, api_name: :latencyColumnName, nil?: true
54
+
55
+ # @!attribute timestamp_column_name
56
+ # Name of the column with the timestamps. Timestamps must be in UNIX sec format.
57
+ # If not provided, the upload timestamp is used.
58
+ #
59
+ # @return [String, nil]
60
+ optional :timestamp_column_name, String, api_name: :timestampColumnName, nil?: true
61
+
62
+ request_only do
63
+ # @!attribute inference_id_column_name
64
+ # Name of the column with the inference ids. This is useful if you want to update
65
+ # rows at a later point in time. If not provided, a unique id is generated by
66
+ # Openlayer.
67
+ #
68
+ # @return [String, nil]
69
+ optional :inference_id_column_name, String, api_name: :inferenceIdColumnName, nil?: true
70
+ end
71
+
72
+ # @!method initialize(ground_truth_column_name: nil, human_feedback_column_name: nil, inference_id_column_name: nil, latency_column_name: nil, timestamp_column_name: nil)
73
+ # Some parameter documentations has been truncated, see
74
+ # {Openlayer::Models::InferencePipelines::RowUpdateParams::Config} for more
75
+ # details.
76
+ #
77
+ # @param ground_truth_column_name [String, nil] Name of the column with the ground truths.
78
+ #
79
+ # @param human_feedback_column_name [String, nil] Name of the column with human feedback.
80
+ #
81
+ # @param inference_id_column_name [String, nil] Name of the column with the inference ids. This is useful if you want to update
82
+ #
83
+ # @param latency_column_name [String, nil] Name of the column with the latencies.
84
+ #
85
+ # @param timestamp_column_name [String, nil] Name of the column with the timestamps. Timestamps must be in UNIX sec format. I
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ module InferencePipelines
6
+ # @see Openlayer::Resources::InferencePipelines::Rows#update
7
+ class RowUpdateResponse < Openlayer::Internal::Type::BaseModel
8
+ # @!attribute success
9
+ #
10
+ # @return [Boolean, Openlayer::Models::InferencePipelines::RowUpdateResponse::Success]
11
+ required :success, enum: -> { Openlayer::Models::InferencePipelines::RowUpdateResponse::Success }
12
+
13
+ # @!method initialize(success:)
14
+ # @param success [Boolean, Openlayer::Models::InferencePipelines::RowUpdateResponse::Success]
15
+
16
+ # @see Openlayer::Models::InferencePipelines::RowUpdateResponse#success
17
+ module Success
18
+ extend Openlayer::Internal::Type::Enum
19
+
20
+ TRUE = true
21
+
22
+ # @!method self.values
23
+ # @return [Array<Boolean>]
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end