Documentation ¶
Index ¶
- Variables
- func InitJSONSchema()
- func ValidateJSONSchema(schema *jsonschema.Schema, msg interface{}, emitUnpopulated bool) error
- func ValidateJSONSchemaString(schema *jsonschema.Schema, data string) error
- type ArtiVCModelConfiguration
- type ArtiVCModelInstanceConfiguration
- type BaseDynamic
- type BaseStatic
- type Error
- type GCSServiceAccount
- type GCSUserAccount
- type GitHubModelConfiguration
- type GitHubModelInstanceConfiguration
- type HuggingFaceModelConfiguration
- type HuggingFaceModelInstanceConfiguration
- type ListModelQuery
- type LocalModelConfiguration
- type LocalModelInstanceConfiguration
- type Model
- type ModelDefinition
- type ModelInstance
- type ModelInstanceInferResult
- type ModelInstanceState
- type ModelInstanceTask
- type ModelVisibility
- type ReleaseStage
- type TritonModel
Constants ¶
This section is empty.
Variables ¶
var GCSServiceAccountJSONSchema *jsonschema.Schema
GCSServiceAccountJSONSchema represents the GCS Service Account JSON Schema for validating the payload
var GCSUserAccountJSONSchema *jsonschema.Schema
GCSUserAccountJSONSchema represents the GCS User Account JSON Schema for validating the payload
var ModelDefJSONSchema *jsonschema.Schema
ModelDefJSONSchema represents the ModelDefinition JSON Schema for validating the payload
var ModelInstanceCardJSONSchema *jsonschema.Schema
ModelInstanceCardJSONSchema represents the Model Instance Card JSON Schema for validating the payload
var ModelInstanceJSONSchema *jsonschema.Schema
ModelInstanceJSONSchema represents the Model Instance JSON Schema for validating the payload
var ModelJSONSchema *jsonschema.Schema
ModelJSONSchema represents the Model JSON Schema for validating the payload
Functions ¶
func InitJSONSchema ¶
func InitJSONSchema()
InitJSONSchema initialise JSON Schema instances with the given files
func ValidateJSONSchema ¶
ValidateJSONSchema validates the Protobuf message data
func ValidateJSONSchemaString ¶
ValidateJSONSchemaString validates the string data given a string schema
Types ¶
type BaseDynamic ¶
type BaseDynamic struct { UID uuid.UUID `gorm:"type:uuid;primary_key;<-:create"` // allow read and create CreateTime time.Time `gorm:"autoCreateTime:nano"` UpdateTime time.Time `gorm:"autoUpdateTime:nano"` DeleteTime gorm.DeletedAt `sql:"index"` }
BaseDynamic contains common columns for all tables with dynamic UUID as primary key generated when creating
func (*BaseDynamic) BeforeCreate ¶
func (base *BaseDynamic) BeforeCreate(db *gorm.DB) error
BeforeCreate will set a UUID rather than numeric ID.
type BaseStatic ¶
type GCSServiceAccount ¶
type GCSServiceAccount struct { Type string `json:"type,omitempty"` ProjectId string `json:"project_id,omitempty"` PrivateKeyId string `json:"private_key_id,omitempty"` PrivateKey string `json:"private_key,omitempty"` ClientEmail string `json:"client_email,omitempty"` ClientId string `json:"client_id,omitempty"` AuthUri string `json:"auth_uri,omitempty"` TokenUri string `json:"token_uri,omitempty"` AuthProviderX509CertUrl string `json:"auth_provider_x509_cert_url,omitempty"` ClientX509CertUrl string `json:"client_x509_cert_url,omitempty"` }
type GCSUserAccount ¶
type GitHubModelConfiguration ¶
type GitHubModelConfiguration struct { Repository string `json:"repository,omitempty"` HtmlUrl string `json:"html_url,omitempty"` }
Model configuration
type GitHubModelInstanceConfiguration ¶
type GitHubModelInstanceConfiguration struct { Repository string `json:"repository,omitempty"` Tag string `json:"tag,omitempty"` HtmlUrl string `json:"html_url,omitempty"` }
Model Instance configuration
type ListModelQuery ¶
type ListModelQuery struct {
Owner string
}
type LocalModelConfiguration ¶
type LocalModelConfiguration struct {
Content string `json:"content,omitempty"`
}
type Model ¶
type Model struct { BaseDynamic // Model id ID string `json:"id,omitempty"` // Model description Description sql.NullString // Model definition ModelDefinitionUid uuid.UUID `gorm:"model_definition_uid,omitempty"` // Model definition configuration Configuration datatypes.JSON `json:"configuration,omitempty"` // Model visibility Visibility ModelVisibility `json:"visibility,omitempty"` // Model owner Owner string `json:"owner,omitempty"` // Not stored in DB, only used for processing Instances []ModelInstance `gorm:"foreignKey:ModelUID;references:UID;constraint:OnDelete:CASCADE;"` }
Model combines several Triton model. It includes ensemble model.
type ModelDefinition ¶
type ModelDefinition struct { BaseStatic // ModelDefinition id ID string `json:"id,omitempty"` // ModelDefinition title Title string `json:"title,omitempty"` // ModelDefinition documentation_url DocumentationUrl string `json:"documentation_url,omitempty"` // ModelDefinition icon Icon string `json:"icon,omitempty"` // ModelDefinition model spec ModelSpec datatypes.JSON `json:"model_spec,omitempty"` // ModelDefinition model instance spec ModelInstanceSpec datatypes.JSON `json:"model_instance_spec,omitempty"` ReleaseStage ReleaseStage `sql:"type:valid_release_stage"` }
type ModelInstance ¶
type ModelInstance struct { BaseDynamic // Model Instance id ID string `json:"id,omitempty"` // Model instance status State ModelInstanceState `sql:"type:valid_state"` // Model instance task Task ModelInstanceTask `json:"task,omitempty"` // Model instance configuration Configuration datatypes.JSON `json:"configuration,omitempty"` // Model id ModelUID uuid.UUID `json:"model_uid,omitempty"` // Not stored in DB, only used for processing TritonModels []TritonModel `gorm:"foreignKey:ModelInstanceUID;references:UID;constraint:OnDelete:CASCADE;"` }
func (*ModelInstance) Scan ¶
func (r *ModelInstance) Scan(value interface{}) error
type ModelInstanceInferResult ¶
type ModelInstanceInferResult struct { BaseDynamic // Inference id: `instance model id.{datetime}.infer` created by temporal ID string `json:"id,omitempty"` // Inference result Result datatypes.JSON `json:"result,omitempty"` // Model Instance uid ModelInstanceUID uuid.UUID `json:"model_instance_uid,omitempty"` }
type ModelInstanceState ¶
type ModelInstanceState modelPB.ModelInstance_State
func (*ModelInstanceState) Scan ¶
func (s *ModelInstanceState) Scan(value interface{}) error
type ModelInstanceTask ¶
type ModelInstanceTask modelPB.ModelInstance_Task
func (*ModelInstanceTask) Scan ¶
func (s *ModelInstanceTask) Scan(value interface{}) error
type ModelVisibility ¶
type ModelVisibility modelPB.Model_Visibility
func (*ModelVisibility) Scan ¶
func (v *ModelVisibility) Scan(value interface{}) error
type ReleaseStage ¶
type ReleaseStage modelPB.ReleaseStage
ReleaseStage is an alias type for Protobuf enum ReleaseStage
func (*ReleaseStage) Scan ¶
func (r *ReleaseStage) Scan(value interface{}) error
Scan function for custom GORM type ReleaseStage
type TritonModel ¶
type TritonModel struct { BaseDynamic // Triton Model name Name string `json:"name,omitempty"` // Triton Model version Version int `json:"version,omitempty"` // Triton Model status State ModelInstanceState `json:"state,omitempty"` // Model triton platform, only store ensemble model to make inferencing Platform string `json:"platform,omitempty"` // Model Instance uid ModelInstanceUID uuid.UUID `json:"model_instance_uid,omitempty"` }
Triton model