Class: Openlayer::Resources::InferencePipelines::Rows

Inherits:
Object
  • Object
show all
Defined in:
lib/openlayer/resources/inference_pipelines/rows.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Rows

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Rows.

Parameters:



88
89
90
# File 'lib/openlayer/resources/inference_pipelines/rows.rb', line 88

def initialize(client:)
  @client = client
end

Instance Method Details

#list(inference_pipeline_id, asc: nil, page: nil, per_page: nil, sort_column: nil, column_filters: nil, exclude_row_id_list: nil, not_search_query_and: nil, not_search_query_or: nil, row_id_list: nil, search_query_and: nil, search_query_or: nil, request_options: {}) ⇒ Openlayer::Models::InferencePipelines::RowListResponse

A list of rows for an inference pipeline.

Parameters:

Returns:

See Also:



71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/openlayer/resources/inference_pipelines/rows.rb', line 71

def list(inference_pipeline_id, params = {})
  query_params = [:asc, :page, :per_page, :sort_column]
  parsed, options = Openlayer::InferencePipelines::RowListParams.dump_request(params)
  query = Openlayer::Internal::Util.encode_query_params(parsed.slice(*query_params))
  @client.request(
    method: :post,
    path: ["inference-pipelines/%1$s/rows", inference_pipeline_id],
    query: query.transform_keys(per_page: "perPage", sort_column: "sortColumn"),
    body: parsed.except(*query_params),
    model: Openlayer::Models::InferencePipelines::RowListResponse,
    options: options
  )
end

#update(inference_pipeline_id, inference_id:, row:, config: nil, request_options: {}) ⇒ Openlayer::Models::InferencePipelines::RowUpdateResponse

Update an inference data point in an inference pipeline.

Parameters:

Returns:

See Also:



24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/openlayer/resources/inference_pipelines/rows.rb', line 24

def update(inference_pipeline_id, params)
  query_params = [:inference_id]
  parsed, options = Openlayer::InferencePipelines::RowUpdateParams.dump_request(params)
  query = Openlayer::Internal::Util.encode_query_params(parsed.slice(*query_params))
  @client.request(
    method: :put,
    path: ["inference-pipelines/%1$s/rows", inference_pipeline_id],
    query: query.transform_keys(inference_id: "inferenceId"),
    body: parsed.except(*query_params),
    model: Openlayer::Models::InferencePipelines::RowUpdateResponse,
    options: options
  )
end