Documentation
¶
Index ¶
- Constants
- Variables
- func HostFromEnvironment() string
- type Client
- func (c *Client) InitiateAndDoFileChallenge(ctx context.Context, weights []File, files []File) ([]FileChallengeAnswer, error)
- func (c *Client) PostNewVersion(ctx context.Context, image string, weights []File, files []File, ...) error
- func (c *Client) PostPushStart(ctx context.Context, pushID string, buildTime time.Duration) error
- type Env
- type File
- type FileChallenge
- type FileChallengeAnswer
- type FileChallengeRequest
- type RuntimeConfig
- type Version
Constants ¶
View Source
const WebHostEnvVarName = "R8_WEB_HOST"
Variables ¶
View Source
var ( ErrorBadResponseNewVersionEndpoint = errors.New("Bad response from new version endpoint") ErrorBadResponsePushStartEndpoint = errors.New("Bad response from push start endpoint") ErrorBadResponseInitiateChallengeEndpoint = errors.New("Bad response from start file challenge endpoint") ErrorBadRegistryURL = errors.New("The image URL must have 3 components in the format of " + global.ReplicateRegistryHost + "/your-username/your-model") ErrorBadRegistryHost = errors.New("The image name must have the " + global.ReplicateRegistryHost + " prefix when using --x-fast.") ErrorNoSuchDigest = errors.New("No digest submitted matches the digest requested") )
Functions ¶
func HostFromEnvironment ¶
func HostFromEnvironment() string
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) InitiateAndDoFileChallenge ¶
func (*Client) PostNewVersion ¶
type Env ¶
type Env struct { CogGpu string `json:"COG_GPU"` CogPredictTypeStub string `json:"COG_PREDICT_TYPE_STUB"` CogTrainTypeStub string `json:"COG_TRAIN_TYPE_STUB"` CogPredictCodeStrip string `json:"COG_PREDICT_CODE_STRIP"` CogTrainCodeStrip string `json:"COG_TRAIN_CODE_STRIP"` R8CogVersion string `json:"R8_COG_VERSION"` R8CudaVersion string `json:"R8_CUDA_VERSION"` R8CudnnVersion string `json:"R8_CUDNN_VERSION"` R8PythonVersion string `json:"R8_PYTHON_VERSION"` R8TorchVersion string `json:"R8_TORCH_VERSION"` }
type FileChallenge ¶
type FileChallengeAnswer ¶
type FileChallengeRequest ¶
type RuntimeConfig ¶
type Version ¶
type Version struct { Annotations map[string]string `json:"annotations"` CogConfig config.Config `json:"cog_config"` CogVersion string `json:"cog_version"` OpenAPISchema map[string]any `json:"openapi_schema"` RuntimeConfig RuntimeConfig `json:"runtime_config"` Virtual bool `json:"virtual"` PushID string `json:"push_id"` Challenges []FileChallengeAnswer `json:"file_challenges"` }
Click to show internal directories.
Click to hide internal directories.