training

package
v5.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 19 Imported by: 0

README

Model Training

Model - Lifecycle - CREATE/UPDATE/DELETE/GETDETAILS

CreateModel

Request to create a model, please note as part of MVP1, there will not be any workflows associated with model request approval

AI consumers , will pass the below details list of addresses that can access this model ( applicable if model is not public) is model is public Description of the model

In return the AI consumer will get back a model ID

UpdateModelAccess

AI consumer can add/remove addresses associated with a given model , can also make this public from private and viceversa.

DeleteModel

AI consumer had created and can request that the model be deleted.

GetModelStatus

Pass the model Id and get back the training status of this model

GetAllAccessibleModels

An AI consumer can always call back this method to determine the list of models associated to a given address , this can be used while making inference calls , the AI consumer can pick the model of their choice if multiple models are available

Documentation

Index

Constants

View Source
const (
	DateFormat = "02-01-2006"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IService

type IService interface {
}

type ModelData

type ModelData struct {
	IsPublic            bool
	ModelName           string
	AuthorizedAddresses []string
	Status              Status
	CreatedByAddress    string
	ModelId             string
	UpdatedByAddress    string
	GroupId             string
	OrganizationId      string
	ServiceId           string
	GRPCMethodName      string
	GRPCServiceName     string
	Description         string
	IsDefault           bool
	TrainingLink        string
	UpdatedDate         string
}

func (*ModelData) String

func (data *ModelData) String() string

type ModelKey

type ModelKey struct {
	OrganizationId  string
	ServiceId       string
	GroupId         string
	GRPCMethodName  string
	GRPCServiceName string
	ModelId         string
}

func (*ModelKey) String

func (key *ModelKey) String() string

type ModelService

type ModelService struct {
	// contains filtered or unexported fields
}

func (ModelService) CreateModel

func (service ModelService) CreateModel(c context.Context, request *CreateModelRequest) (response *ModelDetailsResponse,
	err error)

func (ModelService) DeleteModel

func (service ModelService) DeleteModel(c context.Context, request *UpdateModelRequest) (response *ModelDetailsResponse,
	err error)

func (ModelService) GetAllModels

func (service ModelService) GetAllModels(c context.Context, request *AccessibleModelsRequest) (response *AccessibleModelsResponse, err error)

func (ModelService) GetModelStatus

func (service ModelService) GetModelStatus(c context.Context, request *ModelDetailsRequest) (response *ModelDetailsResponse,
	err error)

func (ModelService) UpdateModelAccess

func (service ModelService) UpdateModelAccess(c context.Context, request *UpdateModelRequest) (response *ModelDetailsResponse,
	err error)

type ModelStorage

type ModelStorage struct {
	// contains filtered or unexported fields
}

func NewModelStorage

func NewModelStorage(atomicStorage storage.AtomicStorage) *ModelStorage

func (*ModelStorage) CompareAndSwap

func (storage *ModelStorage) CompareAndSwap(key *ModelKey, prevState *ModelData,
	newState *ModelData) (ok bool, err error)

func (*ModelStorage) Get

func (storage *ModelStorage) Get(key *ModelKey) (state *ModelData, ok bool, err error)

func (*ModelStorage) GetAll

func (storage *ModelStorage) GetAll() (states []*ModelData, err error)

func (*ModelStorage) Put

func (storage *ModelStorage) Put(key *ModelKey, state *ModelData) (err error)

func (*ModelStorage) PutIfAbsent

func (storage *ModelStorage) PutIfAbsent(key *ModelKey, state *ModelData) (ok bool, err error)

type ModelUserData

type ModelUserData struct {
	ModelIds []string
	//the below are only for display purposes
	OrganizationId  string
	ServiceId       string
	GroupId         string
	GRPCMethodName  string
	GRPCServiceName string
	UserAddress     string
}

ModelUserData maintain the list of all modelIds for a given user address

func (*ModelUserData) String

func (data *ModelUserData) String() string

type ModelUserKey

type ModelUserKey struct {
	OrganizationId  string
	ServiceId       string
	GroupId         string
	GRPCMethodName  string
	GRPCServiceName string
	UserAddress     string
}

func (*ModelUserKey) String

func (key *ModelUserKey) String() string

type ModelUserStorage

type ModelUserStorage struct {
	// contains filtered or unexported fields
}

func NewUerModelStorage

func NewUerModelStorage(atomicStorage storage.AtomicStorage) *ModelUserStorage

func (*ModelUserStorage) CompareAndSwap

func (storage *ModelUserStorage) CompareAndSwap(key *ModelUserKey, prevState *ModelUserData,
	newState *ModelUserData) (ok bool, err error)

func (*ModelUserStorage) Get

func (storage *ModelUserStorage) Get(key *ModelUserKey) (state *ModelUserData, ok bool, err error)

func (*ModelUserStorage) GetAll

func (storage *ModelUserStorage) GetAll() (states []*ModelUserData, err error)

func (*ModelUserStorage) Put

func (storage *ModelUserStorage) Put(key *ModelUserKey, state *ModelUserData) (err error)

func (*ModelUserStorage) PutIfAbsent

func (storage *ModelUserStorage) PutIfAbsent(key *ModelUserKey, state *ModelUserData) (ok bool, err error)

type NoModelSupportService

type NoModelSupportService struct {
}

func (NoModelSupportService) CreateModel

func (n NoModelSupportService) CreateModel(c context.Context, request *CreateModelRequest) (*ModelDetailsResponse, error)

func (NoModelSupportService) DeleteModel

func (n NoModelSupportService) DeleteModel(c context.Context, request *UpdateModelRequest) (*ModelDetailsResponse, error)

func (NoModelSupportService) GetAllModels

func (n NoModelSupportService) GetAllModels(c context.Context, request *AccessibleModelsRequest) (*AccessibleModelsResponse, error)

func (NoModelSupportService) GetModelStatus

func (n NoModelSupportService) GetModelStatus(c context.Context, id *ModelDetailsRequest) (*ModelDetailsResponse, error)

func (NoModelSupportService) UpdateModelAccess

func (n NoModelSupportService) UpdateModelAccess(c context.Context, request *UpdateModelRequest) (*ModelDetailsResponse, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL