...

Package modeldeployment

import "github.com/oracle/oci-go-sdk/modeldeployment"
Overview
Index

Overview ▾

Index ▾

type InferenceResult
    func (m InferenceResult) String() string
    func (m InferenceResult) ValidateEnumValue() (bool, error)
type ModelDeploymentClient
    func NewModelDeploymentClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ModelDeploymentClient, err error)
    func NewModelDeploymentClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client ModelDeploymentClient, err error)
    func (client *ModelDeploymentClient) ConfigurationProvider() *common.ConfigurationProvider
    func (client ModelDeploymentClient) Predict(ctx context.Context, request PredictRequest) (response PredictResponse, err error)
    func (client ModelDeploymentClient) PredictWithResponseStream(ctx context.Context, request PredictWithResponseStreamRequest) (response PredictWithResponseStreamResponse, err error)
    func (client *ModelDeploymentClient) SetCustomClientConfiguration(config common.CustomClientConfiguration)
    func (client *ModelDeploymentClient) SetRegion(region string)
type PredictRequest
    func (request PredictRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool)
    func (request PredictRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error)
    func (request PredictRequest) RetryPolicy() *common.RetryPolicy
    func (request PredictRequest) String() string
    func (request PredictRequest) ValidateEnumValue() (bool, error)
type PredictResponse
    func (response PredictResponse) HTTPResponse() *http.Response
    func (response PredictResponse) String() string
type PredictWithResponseStreamRequest
    func (request PredictWithResponseStreamRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool)
    func (request PredictWithResponseStreamRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error)
    func (request PredictWithResponseStreamRequest) RetryPolicy() *common.RetryPolicy
    func (request PredictWithResponseStreamRequest) String() string
    func (request PredictWithResponseStreamRequest) ValidateEnumValue() (bool, error)
type PredictWithResponseStreamResponse
    func (response PredictWithResponseStreamResponse) HTTPResponse() *http.Response
    func (response PredictWithResponseStreamResponse) String() string

Package files

inference_result.go modeldeployment_client.go predict_request_response.go predict_with_response_stream_request_response.go

type InferenceResult

InferenceResult A model used in x-related-resource for grouping actions with no returned body.

type InferenceResult struct {

    // The predict result returned by model
    Data []byte `mandatory:"true" json:"data"`
}

func (InferenceResult) String

func (m InferenceResult) String() string

func (InferenceResult) ValidateEnumValue

func (m InferenceResult) ValidateEnumValue() (bool, error)

ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly

type ModelDeploymentClient

ModelDeploymentClient a client for ModelDeployment

type ModelDeploymentClient struct {
    common.BaseClient
    // contains filtered or unexported fields
}

func NewModelDeploymentClientWithConfigurationProvider

func NewModelDeploymentClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ModelDeploymentClient, err error)

NewModelDeploymentClientWithConfigurationProvider Creates a new default ModelDeployment client with the given configuration provider. the configuration provider will be used for the default signer as well as reading the region

func NewModelDeploymentClientWithOboToken

func NewModelDeploymentClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client ModelDeploymentClient, err error)

NewModelDeploymentClientWithOboToken Creates a new default ModelDeployment client with the given configuration provider. The obotoken will be added to default headers and signed; the configuration provider will be used for the signer

as well as reading the region

func (*ModelDeploymentClient) ConfigurationProvider

func (client *ModelDeploymentClient) ConfigurationProvider() *common.ConfigurationProvider

ConfigurationProvider the ConfigurationProvider used in this client, or null if none set

func (ModelDeploymentClient) Predict

func (client ModelDeploymentClient) Predict(ctx context.Context, request PredictRequest) (response PredictResponse, err error)

Predict Invoking a model deployment calls the predict endpoint of the model deployment URI. This endpoint takes sample data as input and is processed using the predict() function in score.py model artifact file

See also

Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/modeldeployment/Predict.go.html to see an example of how to use Predict API. A default retry strategy applies to this operation Predict()

func (ModelDeploymentClient) PredictWithResponseStream

func (client ModelDeploymentClient) PredictWithResponseStream(ctx context.Context, request PredictWithResponseStreamRequest) (response PredictWithResponseStreamResponse, err error)

PredictWithResponseStream Invoking a model deployment calls the predictWithResponseStream endpoint of the model deployment URI to get the streaming result. This endpoint takes sample data as input and is processed using the predict() function in score.py model artifact file

See also

Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/modeldeployment/PredictWithResponseStream.go.html to see an example of how to use PredictWithResponseStream API. A default retry strategy applies to this operation PredictWithResponseStream()

func (*ModelDeploymentClient) SetCustomClientConfiguration

func (client *ModelDeploymentClient) SetCustomClientConfiguration(config common.CustomClientConfiguration)

SetCustomClientConfiguration sets client with retry and other custom configurations

func (*ModelDeploymentClient) SetRegion

func (client *ModelDeploymentClient) SetRegion(region string)

SetRegion overrides the region of this client.

type PredictRequest

PredictRequest wrapper for the Predict operation

See also

Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/modeldeployment/Predict.go.html to see an example of how to use PredictRequest.

type PredictRequest struct {

    // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model deployment.
    ModelDeploymentId *string `mandatory:"true" contributesTo:"path" name:"modelDeploymentId"`

    // Input data details for making a prediction call
    RequestBody *string `mandatory:"true" contributesTo:"body"`

    // Unique Oracle identifier for request
    OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`

    // Metadata about the request. This information will not be transmitted to the service, but
    // represents information that the SDK will consume to drive retry behavior.
    RequestMetadata common.RequestMetadata
}

func (PredictRequest) BinaryRequestBody

func (request PredictRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool)

BinaryRequestBody implements the OCIRequest interface

func (PredictRequest) HTTPRequest

func (request PredictRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error)

HTTPRequest implements the OCIRequest interface

func (PredictRequest) RetryPolicy

func (request PredictRequest) RetryPolicy() *common.RetryPolicy

RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.

func (PredictRequest) String

func (request PredictRequest) String() string

func (PredictRequest) ValidateEnumValue

func (request PredictRequest) ValidateEnumValue() (bool, error)

ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly

type PredictResponse

PredictResponse wrapper for the Predict operation

type PredictResponse struct {

    // The underlying http response
    RawResponse *http.Response

    // The string instance
    Value *string `presentIn:"body"`

    // Unique Oracle-assigned identifier for the request. If you need to contact
    // Oracle about a particular request, please provide the request ID.
    OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
}

func (PredictResponse) HTTPResponse

func (response PredictResponse) HTTPResponse() *http.Response

HTTPResponse implements the OCIResponse interface

func (PredictResponse) String

func (response PredictResponse) String() string

type PredictWithResponseStreamRequest

PredictWithResponseStreamRequest wrapper for the PredictWithResponseStream operation

See also

Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/modeldeployment/PredictWithResponseStream.go.html to see an example of how to use PredictWithResponseStreamRequest.

type PredictWithResponseStreamRequest struct {

    // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model deployment.
    ModelDeploymentId *string `mandatory:"true" contributesTo:"path" name:"modelDeploymentId"`

    // Input data details for making a prediction call
    RequestBody *string `mandatory:"true" contributesTo:"body"`

    // Unique Oracle identifier for request
    OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`

    // Metadata about the request. This information will not be transmitted to the service, but
    // represents information that the SDK will consume to drive retry behavior.
    RequestMetadata common.RequestMetadata
}

func (PredictWithResponseStreamRequest) BinaryRequestBody

func (request PredictWithResponseStreamRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool)

BinaryRequestBody implements the OCIRequest interface

func (PredictWithResponseStreamRequest) HTTPRequest

func (request PredictWithResponseStreamRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error)

HTTPRequest implements the OCIRequest interface

func (PredictWithResponseStreamRequest) RetryPolicy

func (request PredictWithResponseStreamRequest) RetryPolicy() *common.RetryPolicy

RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.

func (PredictWithResponseStreamRequest) String

func (request PredictWithResponseStreamRequest) String() string

func (PredictWithResponseStreamRequest) ValidateEnumValue

func (request PredictWithResponseStreamRequest) ValidateEnumValue() (bool, error)

ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly

type PredictWithResponseStreamResponse

PredictWithResponseStreamResponse wrapper for the PredictWithResponseStream operation

type PredictWithResponseStreamResponse struct {

    // The underlying http response
    RawResponse *http.Response

    // The io.ReadCloser instance
    Content io.ReadCloser `presentIn:"body" encoding:"binary"`

    // Unique Oracle-assigned identifier for the request. If you need to contact
    // Oracle about a particular request, please provide the request ID.
    OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
}

func (PredictWithResponseStreamResponse) HTTPResponse

func (response PredictWithResponseStreamResponse) HTTPResponse() *http.Response

HTTPResponse implements the OCIResponse interface

func (PredictWithResponseStreamResponse) String

func (response PredictWithResponseStreamResponse) String() string