Class: Openlayer::Resources::InferencePipelines

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

Defined Under Namespace

Classes: Data, Rows, TestResults

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ InferencePipelines

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 InferencePipelines.

Parameters:



93
94
95
96
97
98
# File 'lib/openlayer/resources/inference_pipelines.rb', line 93

def initialize(client:)
  @client = client
  @data = Openlayer::Resources::InferencePipelines::Data.new(client: client)
  @rows = Openlayer::Resources::InferencePipelines::Rows.new(client: client)
  @test_results = Openlayer::Resources::InferencePipelines::TestResults.new(client: client)
end

Instance Attribute Details

#dataOpenlayer::Resources::InferencePipelines::Data (readonly)



7
8
9
# File 'lib/openlayer/resources/inference_pipelines.rb', line 7

def data
  @data
end

#rowsOpenlayer::Resources::InferencePipelines::Rows (readonly)



10
11
12
# File 'lib/openlayer/resources/inference_pipelines.rb', line 10

def rows
  @rows
end

#test_resultsOpenlayer::Resources::InferencePipelines::TestResults (readonly)



13
14
15
# File 'lib/openlayer/resources/inference_pipelines.rb', line 13

def test_results
  @test_results
end

Instance Method Details

#delete(inference_pipeline_id, request_options: {}) ⇒ nil

Delete inference pipeline.

Parameters:

  • inference_pipeline_id (String)

    The inference pipeline id (a UUID).

  • request_options (Openlayer::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (nil)

See Also:



81
82
83
84
85
86
87
88
# File 'lib/openlayer/resources/inference_pipelines.rb', line 81

def delete(inference_pipeline_id, params = {})
  @client.request(
    method: :delete,
    path: ["inference-pipelines/%1$s", inference_pipeline_id],
    model: NilClass,
    options: params[:request_options]
  )
end

#retrieve(inference_pipeline_id, expand: nil, request_options: {}) ⇒ Openlayer::Models::InferencePipelineRetrieveResponse

Retrieve inference pipeline.

Parameters:

Returns:

See Also:



28
29
30
31
32
33
34
35
36
37
# File 'lib/openlayer/resources/inference_pipelines.rb', line 28

def retrieve(inference_pipeline_id, params = {})
  parsed, options = Openlayer::InferencePipelineRetrieveParams.dump_request(params)
  @client.request(
    method: :get,
    path: ["inference-pipelines/%1$s", inference_pipeline_id],
    query: parsed,
    model: Openlayer::Models::InferencePipelineRetrieveResponse,
    options: options
  )
end

#update(inference_pipeline_id, description: nil, name: nil, reference_dataset_uri: nil, request_options: {}) ⇒ Openlayer::Models::InferencePipelineUpdateResponse

Some parameter documentations has been truncated, see Models::InferencePipelineUpdateParams for more details.

Update inference pipeline.

Parameters:

  • inference_pipeline_id (String)

    The inference pipeline id (a UUID).

  • description (String, nil)

    The inference pipeline description.

  • name (String)

    The inference pipeline name.

  • reference_dataset_uri (String, nil)

    The storage uri of your reference dataset. We recommend using the Python SDK or

  • request_options (Openlayer::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



59
60
61
62
63
64
65
66
67
68
# File 'lib/openlayer/resources/inference_pipelines.rb', line 59

def update(inference_pipeline_id, params = {})
  parsed, options = Openlayer::InferencePipelineUpdateParams.dump_request(params)
  @client.request(
    method: :put,
    path: ["inference-pipelines/%1$s", inference_pipeline_id],
    body: parsed,
    model: Openlayer::Models::InferencePipelineUpdateResponse,
    options: options
  )
end