Documentation
¶
Index ¶
- type S
- func (s *S) CreateModel(ctx context.Context, req *v1.CreateModelRequest) (*v1.Model, error)
- func (s *S) DeleteModel(ctx context.Context, req *v1.DeleteModelRequest) (*v1.DeleteModelResponse, error)
- func (s *S) GetModel(ctx context.Context, req *v1.GetModelRequest) (*v1.Model, error)
- func (s *S) ListModels(ctx context.Context, req *v1.ListModelsRequest) (*v1.ListModelsResponse, error)
- func (s *S) Run(ctx context.Context, port int, authConfig config.AuthConfig, ...) error
- func (s *S) Stop()
- type WS
- func (s *WS) AcquireUnloadedBaseModel(ctx context.Context, req *v1.AcquireUnloadedBaseModelRequest) (*v1.AcquireUnloadedBaseModelResponse, error)
- func (s *WS) AcquireUnloadedModel(ctx context.Context, req *v1.AcquireUnloadedModelRequest) (*v1.AcquireUnloadedModelResponse, error)
- func (s *WS) CreateBaseModel(ctx context.Context, req *v1.CreateBaseModelRequest) (*v1.BaseModel, error)
- func (s *WS) CreateHFModelRepo(ctx context.Context, req *v1.CreateHFModelRepoRequest) (*v1.HFModelRepo, error)
- func (s *WS) CreateStorageConfig(ctx context.Context, req *v1.CreateStorageConfigRequest) (*v1.StorageConfig, error)
- func (s *WS) GetBaseModelPath(ctx context.Context, req *v1.GetBaseModelPathRequest) (*v1.GetBaseModelPathResponse, error)
- func (s *WS) GetHFModelRepo(ctx context.Context, req *v1.GetHFModelRepoRequest) (*v1.HFModelRepo, error)
- func (s *WS) GetModel(ctx context.Context, req *v1.GetModelRequest) (*v1.Model, error)
- func (s *WS) GetModelAttributes(ctx context.Context, req *v1.GetModelAttributesRequest) (*v1.ModelAttributes, error)
- func (s *WS) GetModelPath(ctx context.Context, req *v1.GetModelPathRequest) (*v1.GetModelPathResponse, error)
- func (s *WS) GetStorageConfig(ctx context.Context, req *v1.GetStorageConfigRequest) (*v1.StorageConfig, error)
- func (s *WS) PublishModel(ctx context.Context, req *v1.PublishModelRequest) (*v1.PublishModelResponse, error)
- func (s *WS) RegisterModel(ctx context.Context, req *v1.RegisterModelRequest) (*v1.RegisterModelResponse, error)
- func (ws *WS) Run(ctx context.Context, port int, authConfig config.AuthConfig) error
- func (ws *WS) Stop()
- func (s *WS) UpdateBaseModelLoadingStatus(ctx context.Context, req *v1.UpdateBaseModelLoadingStatusRequest) (*v1.UpdateBaseModelLoadingStatusResponse, error)
- func (s *WS) UpdateModelLoadingStatus(ctx context.Context, req *v1.UpdateModelLoadingStatusRequest) (*v1.UpdateModelLoadingStatusResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S ¶
type S struct {
v1.UnimplementedModelsServiceServer
// contains filtered or unexported fields
}
S is a server.
func (*S) CreateModel ¶ added in v1.10.0
CreateModel creates a base model.
func (*S) DeleteModel ¶
func (s *S) DeleteModel( ctx context.Context, req *v1.DeleteModelRequest, ) (*v1.DeleteModelResponse, error)
DeleteModel deletes a model.
func (*S) ListModels ¶
func (s *S) ListModels( ctx context.Context, req *v1.ListModelsRequest, ) (*v1.ListModelsResponse, error)
ListModels lists models.
type WS ¶
type WS struct {
v1.UnimplementedModelsWorkerServiceServer
// contains filtered or unexported fields
}
WS is a server for worker services.
func NewWorkerServiceServer ¶
NewWorkerServiceServer creates a new worker service server.
func (*WS) AcquireUnloadedBaseModel ¶ added in v1.10.0
func (s *WS) AcquireUnloadedBaseModel( ctx context.Context, req *v1.AcquireUnloadedBaseModelRequest, ) (*v1.AcquireUnloadedBaseModelResponse, error)
AcquireUnloadedBaseModel checks if there is any unloaded base model. If exists, update the loading status to LOADED and return it.
func (*WS) AcquireUnloadedModel ¶ added in v1.14.0
func (s *WS) AcquireUnloadedModel( ctx context.Context, req *v1.AcquireUnloadedModelRequest, ) (*v1.AcquireUnloadedModelResponse, error)
AcquireUnloadedModel checks if there is any unloaded model. If exists, update the loading status to LOADED and return it.
func (*WS) CreateBaseModel ¶
func (s *WS) CreateBaseModel( ctx context.Context, req *v1.CreateBaseModelRequest, ) (*v1.BaseModel, error)
CreateBaseModel creates a base model.
func (*WS) CreateHFModelRepo ¶ added in v1.4.0
func (s *WS) CreateHFModelRepo( ctx context.Context, req *v1.CreateHFModelRepoRequest, ) (*v1.HFModelRepo, error)
CreateHFModelRepo creates a HuggingFace model repo.
func (*WS) CreateStorageConfig ¶
func (s *WS) CreateStorageConfig( ctx context.Context, req *v1.CreateStorageConfigRequest, ) (*v1.StorageConfig, error)
CreateStorageConfig creates a storage config.
func (*WS) GetBaseModelPath ¶
func (s *WS) GetBaseModelPath( ctx context.Context, req *v1.GetBaseModelPathRequest, ) (*v1.GetBaseModelPathResponse, error)
GetBaseModelPath gets a model path.
func (*WS) GetHFModelRepo ¶ added in v1.4.0
func (s *WS) GetHFModelRepo( ctx context.Context, req *v1.GetHFModelRepoRequest, ) (*v1.HFModelRepo, error)
GetHFModelRepo gets a HuggingFace model repo.
func (*WS) GetModelAttributes ¶
func (s *WS) GetModelAttributes( ctx context.Context, req *v1.GetModelAttributesRequest, ) (*v1.ModelAttributes, error)
GetModelAttributes gets the model attributes.
func (*WS) GetModelPath ¶
func (s *WS) GetModelPath( ctx context.Context, req *v1.GetModelPathRequest, ) (*v1.GetModelPathResponse, error)
GetModelPath gets a model path.
func (*WS) GetStorageConfig ¶
func (s *WS) GetStorageConfig( ctx context.Context, req *v1.GetStorageConfigRequest, ) (*v1.StorageConfig, error)
GetStorageConfig gets a storage config.
func (*WS) PublishModel ¶
func (s *WS) PublishModel( ctx context.Context, req *v1.PublishModelRequest, ) (*v1.PublishModelResponse, error)
PublishModel publishes a model.
func (*WS) RegisterModel ¶
func (s *WS) RegisterModel( ctx context.Context, req *v1.RegisterModelRequest, ) (*v1.RegisterModelResponse, error)
RegisterModel registers a model.
func (*WS) UpdateBaseModelLoadingStatus ¶ added in v1.10.0
func (s *WS) UpdateBaseModelLoadingStatus( ctx context.Context, req *v1.UpdateBaseModelLoadingStatusRequest, ) (*v1.UpdateBaseModelLoadingStatusResponse, error)
UpdateBaseModelLoadingStatus updates the loading status. When the loading succeeded, it also updates the base model metadata.
func (*WS) UpdateModelLoadingStatus ¶ added in v1.14.0
func (s *WS) UpdateModelLoadingStatus( ctx context.Context, req *v1.UpdateModelLoadingStatusRequest, ) (*v1.UpdateModelLoadingStatusResponse, error)
UpdateModelLoadingStatus updates the loading status. When the loading succeeded, it also updates the model metadata.