Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthcheckResponse ¶ added in v0.7.0
type HealthcheckResponse struct {
Status string `json:"status"`
}
type HelpResponse ¶
type HelpResponse struct {
Arguments map[string]*config.RunArgument `json:"arguments"`
}
type Predictor ¶
type Predictor struct {
// contains filtered or unexported fields
}
func NewPredictor ¶
func NewPredictor(_ context.Context, opts PredictorOptions) (*Predictor, error)
NewPredictor constructs a Predictor. See PredictorOptions for the meaning of each field.
func (*Predictor) Predict ¶
func (p *Predictor) Predict(inputs Inputs, context RequestContext) (*Response, error)
type PredictorOptions ¶ added in v0.19.3
type PredictorOptions struct {
RunOptions command.RunOptions
IsTrain bool
Docker command.Command
WeightManager *weights.Manager
}
PredictorOptions configures a Predictor.
RunOptions carries everything the user supplied (image, volumes, env, GPUs, ports). If WeightManager is non-nil, Predictor.Start will call Prepare and merge the resulting read-only mounts into RunOptions.Volumes before launching the container; Stop will Release them afterwards. A nil WeightManager preserves the historical behavior for callers that don't deal with managed weights.
type Request ¶ added in v0.1.0
type Request struct {
// TODO: could this be Inputs?
Input map[string]any `json:"input"`
Context RequestContext `json:"context"`
}
type RequestContext ¶ added in v0.15.1
type RequestContext struct {
ReplicateAPIToken string `json:"replicate_api_token,omitempty"`
}
type ValidationErrorResponse ¶ added in v0.1.0
Click to show internal directories.
Click to hide internal directories.