Documentation
¶
Index ¶
Constants ¶
View Source
const ExampleOutputDir = "cog-example-output"
TODO(andreas): put this somewhere else since it's used by server?
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deployment ¶
type ExampleValue ¶
type HelpResponse ¶
type HelpResponse struct {
Arguments map[string]*model.RunArgument `json:"arguments"`
}
type LocalDockerDeployment ¶
type LocalDockerDeployment struct {
// contains filtered or unexported fields
}
func (*LocalDockerDeployment) Help ¶
func (d *LocalDockerDeployment) Help(ctx context.Context, logWriter logger.Logger) (*HelpResponse, error)
func (*LocalDockerDeployment) RunPrediction ¶
func (*LocalDockerDeployment) Undeploy ¶
func (d *LocalDockerDeployment) Undeploy() error
type LocalDockerPlatform ¶
type LocalDockerPlatform struct {
// contains filtered or unexported fields
}
func NewLocalDockerPlatform ¶
func NewLocalDockerPlatform() (*LocalDockerPlatform, error)
type MockRunFunc ¶
type MockServingDeployment ¶
type MockServingDeployment struct {
// contains filtered or unexported fields
}
func (*MockServingDeployment) Help ¶
func (d *MockServingDeployment) Help(ctx context.Context, logWriter logger.Logger) (*HelpResponse, error)
func (*MockServingDeployment) RunPrediction ¶
func (*MockServingDeployment) Undeploy ¶
func (d *MockServingDeployment) Undeploy() error
type MockServingPlatform ¶
type MockServingPlatform struct {
// contains filtered or unexported fields
}
func NewMockServingPlatform ¶
func NewMockServingPlatform(bootDuration time.Duration, run MockRunFunc, helpArguments map[string]*model.RunArgument) *MockServingPlatform
type ResultValue ¶
type TestResult ¶
type TestResult struct { RunArgs map[string]*model.RunArgument Examples []*model.Example NewExampleOutputs map[string][]byte // map of paths (e.g. "cog-example-output/output.01.png") to contents Stats *model.Stats }
func TestVersion ¶
func TestVersion(ctx context.Context, servingPlatform Platform, imageTag string, examples []*model.Example, dir string, useGPU bool, logWriter logger.Logger) (*TestResult, error)
TestVersion runs the example inputs and checks the example outputs. If examples inputs are defined but example outputs aren't, defined, the resulting outputs are written to exampleOutputDir and the examples object is updated to point to those outputs.
Click to show internal directories.
Click to hide internal directories.