Documentation
¶
Index ¶
- type FakeModelClient
- func (c *FakeModelClient) AcquireUnloadedBaseModel(ctx context.Context, in *v1.AcquireUnloadedBaseModelRequest, ...) (*v1.AcquireUnloadedBaseModelResponse, error)
- func (c *FakeModelClient) AcquireUnloadedModel(ctx context.Context, in *v1.AcquireUnloadedModelRequest, ...) (*v1.AcquireUnloadedModelResponse, error)
- func (c *FakeModelClient) CreateBaseModel(ctx context.Context, in *v1.CreateBaseModelRequest, opts ...grpc.CallOption) (*v1.BaseModel, error)
- func (c *FakeModelClient) CreateHFModelRepo(ctx context.Context, in *v1.CreateHFModelRepoRequest, opts ...grpc.CallOption) (*v1.HFModelRepo, error)
- func (c *FakeModelClient) GetBaseModelPath(ctx context.Context, in *v1.GetBaseModelPathRequest, opts ...grpc.CallOption) (*v1.GetBaseModelPathResponse, error)
- func (c *FakeModelClient) GetHFModelRepo(ctx context.Context, in *v1.GetHFModelRepoRequest, opts ...grpc.CallOption) (*v1.HFModelRepo, error)
- func (c *FakeModelClient) GetModelPath(ctx context.Context, in *v1.GetModelPathRequest, opts ...grpc.CallOption) (*v1.GetModelPathResponse, error)
- func (c *FakeModelClient) PublishModel(ctx context.Context, in *v1.PublishModelRequest, opts ...grpc.CallOption) (*v1.PublishModelResponse, error)
- func (c *FakeModelClient) RegisterModel(ctx context.Context, in *v1.RegisterModelRequest, opts ...grpc.CallOption) (*v1.RegisterModelResponse, error)
- func (c *FakeModelClient) UpdateBaseModelLoadingStatus(ctx context.Context, in *v1.UpdateBaseModelLoadingStatusRequest, ...) (*v1.UpdateBaseModelLoadingStatusResponse, error)
- func (c *FakeModelClient) UpdateModelLoadingStatus(ctx context.Context, in *v1.UpdateModelLoadingStatusRequest, ...) (*v1.UpdateModelLoadingStatusResponse, error)
- type HuggingFaceDownloader
- type L
- type ModelClient
- type ModelDownloader
- type NoopS3Client
- type OllamaDownloader
- type S3Client
- type S3Downloader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeModelClient ¶
type FakeModelClient struct {
// contains filtered or unexported fields
}
FakeModelClient is a fake model client.
func NewFakeModelClient ¶
func NewFakeModelClient() *FakeModelClient
NewFakeModelClient creates a fake model client.
func (*FakeModelClient) AcquireUnloadedBaseModel ¶ added in v1.10.0
func (c *FakeModelClient) AcquireUnloadedBaseModel(ctx context.Context, in *v1.AcquireUnloadedBaseModelRequest, opts ...grpc.CallOption) (*v1.AcquireUnloadedBaseModelResponse, error)
AcquireUnloadedBaseModel acquires an unloaded base model.
func (*FakeModelClient) AcquireUnloadedModel ¶ added in v1.14.0
func (c *FakeModelClient) AcquireUnloadedModel(ctx context.Context, in *v1.AcquireUnloadedModelRequest, opts ...grpc.CallOption) (*v1.AcquireUnloadedModelResponse, error)
AcquireUnloadedModel acquires an unloaded model.
func (*FakeModelClient) CreateBaseModel ¶
func (c *FakeModelClient) CreateBaseModel(ctx context.Context, in *v1.CreateBaseModelRequest, opts ...grpc.CallOption) (*v1.BaseModel, error)
CreateBaseModel creates a base model.
func (*FakeModelClient) CreateHFModelRepo ¶ added in v1.4.0
func (c *FakeModelClient) CreateHFModelRepo(ctx context.Context, in *v1.CreateHFModelRepoRequest, opts ...grpc.CallOption) (*v1.HFModelRepo, error)
CreateHFModelRepo creates a new HuggingFace model repo.
func (*FakeModelClient) GetBaseModelPath ¶
func (c *FakeModelClient) GetBaseModelPath(ctx context.Context, in *v1.GetBaseModelPathRequest, opts ...grpc.CallOption) (*v1.GetBaseModelPathResponse, error)
GetBaseModelPath gets the path of a base model.
func (*FakeModelClient) GetHFModelRepo ¶ added in v1.4.0
func (c *FakeModelClient) GetHFModelRepo(ctx context.Context, in *v1.GetHFModelRepoRequest, opts ...grpc.CallOption) (*v1.HFModelRepo, error)
GetHFModelRepo returns a HuggingFace model repo.
func (*FakeModelClient) GetModelPath ¶ added in v0.119.0
func (c *FakeModelClient) GetModelPath(ctx context.Context, in *v1.GetModelPathRequest, opts ...grpc.CallOption) (*v1.GetModelPathResponse, error)
GetModelPath gets the path of a model.
func (*FakeModelClient) PublishModel ¶ added in v0.119.0
func (c *FakeModelClient) PublishModel(ctx context.Context, in *v1.PublishModelRequest, opts ...grpc.CallOption) (*v1.PublishModelResponse, error)
PublishModel publishes a model.
func (*FakeModelClient) RegisterModel ¶ added in v0.119.0
func (c *FakeModelClient) RegisterModel(ctx context.Context, in *v1.RegisterModelRequest, opts ...grpc.CallOption) (*v1.RegisterModelResponse, error)
RegisterModel register a model.
func (*FakeModelClient) UpdateBaseModelLoadingStatus ¶ added in v1.10.0
func (c *FakeModelClient) UpdateBaseModelLoadingStatus(ctx context.Context, in *v1.UpdateBaseModelLoadingStatusRequest, opts ...grpc.CallOption) (*v1.UpdateBaseModelLoadingStatusResponse, error)
UpdateBaseModelLoadingStatus updates the loading status of a base model.
func (*FakeModelClient) UpdateModelLoadingStatus ¶ added in v1.14.0
func (c *FakeModelClient) UpdateModelLoadingStatus(ctx context.Context, in *v1.UpdateModelLoadingStatusRequest, opts ...grpc.CallOption) (*v1.UpdateModelLoadingStatusResponse, error)
UpdateModelLoadingStatus updates the loading status of a model.
type HuggingFaceDownloader ¶
type HuggingFaceDownloader struct {
// contains filtered or unexported fields
}
HuggingFaceDownloader downloads models from Hugging Face.
func NewHuggingFaceDownloader ¶
func NewHuggingFaceDownloader(cacheDir string, log logr.Logger) *HuggingFaceDownloader
NewHuggingFaceDownloader creates a new HuggingFaceDownloader.
type L ¶
type L struct {
// contains filtered or unexported fields
}
L is a loader.
func New ¶
func New( objectStoreBucket string, objectStorePathPrefix string, baseModelPathPrefix string, modelDownloaderFactory modelDownloaderFactory, s3Client S3Client, modelClient ModelClient, log logr.Logger, ) *L
New creates a new loader.
func (*L) LoadModels ¶ added in v0.119.0
func (l *L) LoadModels( ctx context.Context, baseModels []string, models []config.ModelConfig, sourceRepository v1.SourceRepository, ) error
LoadModels loads base and non-base models.
type ModelClient ¶
type ModelClient interface {
CreateBaseModel(ctx context.Context, in *v1.CreateBaseModelRequest, opts ...grpc.CallOption) (*v1.BaseModel, error)
GetBaseModelPath(ctx context.Context, in *v1.GetBaseModelPathRequest, opts ...grpc.CallOption) (*v1.GetBaseModelPathResponse, error)
GetModelPath(ctx context.Context, in *v1.GetModelPathRequest, opts ...grpc.CallOption) (*v1.GetModelPathResponse, error)
RegisterModel(ctx context.Context, in *v1.RegisterModelRequest, opts ...grpc.CallOption) (*v1.RegisterModelResponse, error)
PublishModel(ctx context.Context, in *v1.PublishModelRequest, opts ...grpc.CallOption) (*v1.PublishModelResponse, error)
CreateHFModelRepo(ctx context.Context, in *v1.CreateHFModelRepoRequest, opts ...grpc.CallOption) (*v1.HFModelRepo, error)
GetHFModelRepo(ctx context.Context, in *v1.GetHFModelRepoRequest, opts ...grpc.CallOption) (*v1.HFModelRepo, error)
AcquireUnloadedBaseModel(ctx context.Context, in *v1.AcquireUnloadedBaseModelRequest, opts ...grpc.CallOption) (*v1.AcquireUnloadedBaseModelResponse, error)
UpdateBaseModelLoadingStatus(ctx context.Context, in *v1.UpdateBaseModelLoadingStatusRequest, opts ...grpc.CallOption) (*v1.UpdateBaseModelLoadingStatusResponse, error)
AcquireUnloadedModel(ctx context.Context, in *v1.AcquireUnloadedModelRequest, opts ...grpc.CallOption) (*v1.AcquireUnloadedModelResponse, error)
UpdateModelLoadingStatus(ctx context.Context, in *v1.UpdateModelLoadingStatusRequest, opts ...grpc.CallOption) (*v1.UpdateModelLoadingStatusResponse, error)
}
ModelClient is an interface for the model client.
type ModelDownloader ¶
type ModelDownloader interface {
// contains filtered or unexported methods
}
ModelDownloader is an interface for downloading a model.
type OllamaDownloader ¶ added in v1.6.0
type OllamaDownloader struct {
// contains filtered or unexported fields
}
OllamaDownloader downloads models from Ollama.
func NewOllamaDownloader ¶ added in v1.6.0
func NewOllamaDownloader(port int, log logr.Logger) *OllamaDownloader
NewOllamaDownloader creates a new OllamaDownloader.
type S3Downloader ¶
type S3Downloader struct {
// contains filtered or unexported fields
}
S3Downloader downloads models from S3.
func NewS3Downloader ¶
func NewS3Downloader(s3Client s3Client, bucket, pathPrefix string, log logr.Logger) *S3Downloader
NewS3Downloader returns a new S3Downloader.