Documentation
¶
Index ¶
- Constants
- Variables
- func Init(cfg *Config)
- func IsSameDomainValue(a, b DomainValue) bool
- func NewComputeFlavorVersion(flaver string, t string, version string) (ComputeFlavor, ComputeVersion, error)
- type Account
- type Activity
- type ActivityType
- type BigmodelType
- type ChoiceQuestion
- type City
- type Competition
- type CompetitionBonus
- type CompetitionDesc
- type CompetitionDuration
- type CompetitionHost
- type CompetitionIdentity
- type CompetitionIndex
- type CompetitionName
- type CompetitionPhase
- type CompetitionRepo
- type CompetitionScoreOrder
- type CompetitionStatus
- type CompetitionSubmission
- type CompetitionSubmissionInfo
- type CompetitionSummary
- type CompetitionTeam
- type CompetitionType
- type Competitor
- type CompetitorInfo
- type CompetitorName
- type CompetitorSummary
- type CompletionQuestion
- type Compute
- type ComputeFlavor
- type ComputeType
- type ComputeVersion
- type Config
- type CoverId
- type CustomizedKey
- type CustomizedValue
- type Dataset
- type DatasetModifiableProperty
- type DatasetSummary
- type Directory
- type DomainTags
- type DomainValue
- type Email
- type FilePath
- type Finetune
- type FinetuneConfig
- type FinetuneIndex
- type FinetuneJob
- type FinetuneJobDetail
- type FinetuneJobInfo
- type FinetuneName
- type FinetuneParameter
- type FinetuneParameterConfig
- type FinetuneSummary
- type FinetuneUserInfo
- type Forum
- type Inference
- type InferenceDetail
- type InferenceIndex
- type InferenceInfo
- type Input
- type InputeFilePath
- type JobDetail
- type JobInfo
- type KeyValue
- type Like
- type Login
- type LuoJiaRecord
- type LuoJiaRecordIndex
- type Model
- type ModelModifiableProperty
- type ModelSummary
- type Password
- type Phone
- type ProjType
- type Project
- type ProjectModifiableProperty
- type ProjectSummary
- type ProtocolName
- type Province
- type Question
- type QuestionSubmission
- type QuestionSubmissionInfo
- type RelatedResources
- type RepoDownloadedEvent
- type RepoType
- type ResourceDesc
- type ResourceIndex
- type ResourceLevel
- type ResourceLikedEvent
- type ResourceName
- type ResourceObject
- type ResourceObjects
- type ResourceRef
- type ResourceSummary
- type ResourceTitle
- type ResourceType
- type ReverselyRelatedResourceInfo
- type SortType
- type Tags
- type TeamName
- type TeamRole
- type TrainingConfig
- type TrainingCreatedEvent
- type TrainingDesc
- type TrainingIndex
- type TrainingName
- type TrainingPlatform
- type TrainingSummary
- type URL
- type UserActivity
- type UserLike
- type UserLuoJiaRecord
- type UserSignedInEvent
- type UserTraining
- type Winners
- type WuKongPicture
- type WuKongPictureDesc
- type WuKongPictureLevel
- type WuKongPictureMeta
Constants ¶
View Source
const ( AIQuestionStatusStart = "start" AIQuestionStatusEnd = "end" )
View Source
const ( RepoTypePublic = "public" RepoTypePrivate = "private" RepoTypeOnline = "online" )
View Source
const ( ResourceProject = "project" ResourceDataset = "dataset" ResourceModel = "model" SortTypeUpdateTime = "update_time" SortTypeFirstLetter = "first_letter" SortTypeDownloadCount = "download_count" )
Variables ¶
View Source
var ( ActivityTypeFork = activityType(activityTypeFork) ActivityTypeLike = activityType(activityTypeLike) ActivityTypeCreate = activityType(activityTypeCreate) ActivityTypeDelete = activityType(activityTypeDelete) )
View Source
var ( BigmodelVQA = BigmodelType(bigmodelVQA) BigmodelPanGu = BigmodelType(bigmodelPanGu) BigmodelLuoJia = BigmodelType(bigmodelLuoJia) BigmodelWuKong = BigmodelType(bigmodelWuKong) BigmodelCodeGeex = BigmodelType(bigmodelCodeGeex) BigmodelGenPicture = BigmodelType(bigmodelGenPicture) BigmodelDescPicture = BigmodelType(bigmodelDescPicture) )
View Source
var ( CompetitionPhaseFinal = competitionPhase("final") CompetitionPhasePreliminary = competitionPhase("preliminary") )
View Source
var ( ReName = regexp.MustCompile("^[a-zA-Z0-9_-]+$") ResourceTypeProject = resourceType(ResourceProject) ResourceTypeModel = resourceType(ResourceModel) ResourceTypeDataset = resourceType(ResourceDataset) )
Functions ¶
func IsSameDomainValue ¶
func IsSameDomainValue(a, b DomainValue) bool
func NewComputeFlavorVersion ¶
func NewComputeFlavorVersion(flaver string, t string, version string) (ComputeFlavor, ComputeVersion, error)
Types ¶
type Activity ¶
type Activity struct {
Type ActivityType
Time int64
RepoType RepoType
ResourceObject
}
type ActivityType ¶
type ActivityType interface {
ActivityType() string
}
ActivityType
func NewActivityType ¶
func NewActivityType(v string) (ActivityType, error)
type ChoiceQuestion ¶
type Competition ¶
type Competition struct {
CompetitionSummary
Doc URL
Forum Forum
DatasetDoc URL
DatasetURL URL
Winners Winners
Type CompetitionType
Phase CompetitionPhase
Enabled bool
}
type CompetitionBonus ¶
type CompetitionBonus interface {
CompetitionBonus() int
}
CompetitionBonus
func NewCompetitionBonus ¶
func NewCompetitionBonus(v int) (CompetitionBonus, error)
type CompetitionDesc ¶
type CompetitionDesc interface {
CompetitionDesc() string
}
CompetitionDesc
func NewCompetitionDesc ¶
func NewCompetitionDesc(v string) (CompetitionDesc, error)
type CompetitionDuration ¶
type CompetitionDuration interface {
CompetitionDuration() string
}
CompetitionDuration
func NewCompetitionDuration ¶
func NewCompetitionDuration(v string) (CompetitionDuration, error)
type CompetitionHost ¶
type CompetitionHost interface {
CompetitionHost() string
}
func NewCompetitionHost ¶
func NewCompetitionHost(v string) (CompetitionHost, error)
type CompetitionIdentity ¶
type CompetitionIdentity interface {
CompetitionIdentity() string
}
CompetitionIdentity
func NewcompetitionIdentity ¶
func NewcompetitionIdentity(v string) (CompetitionIdentity, error)
type CompetitionIndex ¶
type CompetitionIndex struct {
Id string
Phase CompetitionPhase
}
type CompetitionName ¶
type CompetitionName interface {
CompetitionName() string
}
CompetitionName
func NewCompetitionName ¶
func NewCompetitionName(v string) (CompetitionName, error)
type CompetitionPhase ¶
CompetitionPhase
func NewCompetitionPhase ¶
func NewCompetitionPhase(v string) (CompetitionPhase, error)
type CompetitionRepo ¶
type CompetitionRepo struct {
TeamId string
Individual Account
Owner Account
Repo ResourceName
}
type CompetitionScoreOrder ¶
func NewCompetitionScoreOrder ¶
func NewCompetitionScoreOrder(b bool) CompetitionScoreOrder
type CompetitionStatus ¶
CompetitionStatus
func NewCompetitionStatus ¶
func NewCompetitionStatus(v string) (CompetitionStatus, error)
type CompetitionSubmission ¶
type CompetitionSubmission struct {
Id string
TeamId string
Individual Account
SubmitAt int64
OBSPath string
Status string
Score float32
}
func (*CompetitionSubmission) IsSuccess ¶
func (info *CompetitionSubmission) IsSuccess() bool
func (*CompetitionSubmission) IsTeamWork ¶
func (r *CompetitionSubmission) IsTeamWork() bool
func (*CompetitionSubmission) Key ¶
func (r *CompetitionSubmission) Key() string
type CompetitionSubmissionInfo ¶
func (*CompetitionSubmissionInfo) IsSuccess ¶
func (info *CompetitionSubmissionInfo) IsSuccess() bool
type CompetitionSummary ¶
type CompetitionSummary struct {
Id string
Name CompetitionName
Desc CompetitionDesc
Host CompetitionHost
Bonus CompetitionBonus
Status CompetitionStatus
Duration CompetitionDuration
Poster URL
ScoreOrder CompetitionScoreOrder
}
type CompetitionTeam ¶
type CompetitionType ¶
type CompetitionType interface {
CompetitionType() string
}
CompetitionType
func NewCompetitionType ¶
func NewCompetitionType(v string) (CompetitionType, error)
type Competitor ¶
type Competitor struct {
CompetitorInfo
Team CompetitionTeam
TeamRole TeamRole
}
type CompetitorInfo ¶
type CompetitorInfo struct {
Account Account
Name CompetitorName
City City
Email Email
Phone Phone
Identity CompetitionIdentity
Province Province
Detail map[string]string
}
type CompetitorName ¶
type CompetitorName interface {
CompetitorName() string
}
CompetitorName
func NewCompetitorName ¶
func NewCompetitorName(v string) (CompetitorName, error)
type CompetitorSummary ¶
type CompletionQuestion ¶
type Compute ¶
type Compute struct {
Type ComputeType
Flavor ComputeFlavor
Version ComputeVersion
}
type ComputeType ¶
type ComputeType interface {
ComputeType() string
}
ComputeType
func NewComputeType ¶
func NewComputeType(v string) (ComputeType, error)
type ComputeVersion ¶
type ComputeVersion interface {
ComputeVersion() string
}
ComputeVersion
func NewComputeVersion ¶
func NewComputeVersion(v string) (ComputeVersion, error)
type Config ¶
type Config struct {
MaxBioLength int `json:"max_bio_length"`
MaxNameLength int `json:"max_name_length"`
MinNameLength int `json:"min_name_length"`
MaxTitleLength int `json:"max_title_length"`
MinTitleLength int `json:"min_title_length"`
MaxDescLength int `json:"max_desc_length"`
MaxNicknameLength int `json:"max_nickname_length"`
MaxRelatedResourceNum int `json:"max_related_resource_num"`
Covers []string `json:"covers" required:"true"`
Protocols []string `json:"protocols" required:"true"`
ProjectType []string `json:"project_type" required:"true"`
TrainingPlatform []string `json:"training_platform" required:"true"`
AvatarURL []string `json:"avatar_url" required:"true"`
MaxTrainingNameLength int `json:"max_training_name_length"`
MinTrainingNameLength int `json:"min_training_name_length"`
MaxTrainingDescLength int `json:"max_training_desc_length"`
MaxFinetuneNameLength int `json:"max_finetune_name_length"`
MinFinetuneNameLength int `json:"min_finetune_name_length"`
WuKongPictureMaxDescLength int `json:"wukong_picture_max_desc_length"`
// Key is the finetue model name
Finetunes map[string]FinetuneParameterConfig `json:"finetunes"`
// contains filtered or unexported fields
}
var DomainConfig Config
func (*Config) HasAvatarURL ¶
func (*Config) SetDefault ¶
func (cfg *Config) SetDefault()
type CustomizedKey ¶
type CustomizedKey interface {
CustomizedKey() string
}
CustomizedKey
func NewCustomizedKey ¶
func NewCustomizedKey(v string) (CustomizedKey, error)
type CustomizedValue ¶
type CustomizedValue interface {
CustomizedValue() string
}
CustomizedValue
func NewCustomizedValue ¶
func NewCustomizedValue(v string) (CustomizedValue, error)
type Dataset ¶
type Dataset struct {
Id string
Owner Account
Protocol ProtocolName
DatasetModifiableProperty
RepoId string
CreatedAt int64
UpdatedAt int64
Version int
// following fileds is not under the controlling of version
LikeCount int
DownloadCount int
RelatedModels RelatedResources
RelatedProjects RelatedResources
}
func (*Dataset) RelatedResources ¶
func (d *Dataset) RelatedResources() []ResourceObjects
func (*Dataset) ResourceIndex ¶
func (d *Dataset) ResourceIndex() ResourceIndex
func (*Dataset) ResourceObject ¶
func (d *Dataset) ResourceObject() (ResourceObject, RepoType)
type DatasetModifiableProperty ¶
type DatasetModifiableProperty struct {
Name ResourceName
Desc ResourceDesc
Title ResourceTitle
RepoType RepoType
Tags []string
TagKinds []string
}
type DatasetSummary ¶
type DatasetSummary struct {
Id string
Owner Account
Name ResourceName
Desc ResourceDesc
Title ResourceTitle
Tags []string
UpdatedAt int64
LikeCount int
DownloadCount int
}
type DomainTags ¶
func (*DomainTags) GetKindsOfTags ¶
func (t *DomainTags) GetKindsOfTags(tags []string) []string
type Finetune ¶
type Finetune struct {
Id string
CreatedAt int64
FinetuneConfig
// following fileds is not under the controlling of version
Job FinetuneJobInfo
JobDetail FinetuneJobDetail
}
type FinetuneConfig ¶
type FinetuneConfig struct {
Name FinetuneName
Param FinetuneParameter
}
type FinetuneIndex ¶
type FinetuneJob ¶
type FinetuneJob struct {
FinetuneJobInfo
Status string
}
type FinetuneJobDetail ¶
type FinetuneJobInfo ¶
type FinetuneName ¶
type FinetuneName interface {
FinetuneName() string
}
FinetuneName
func NewFinetuneName ¶
func NewFinetuneName(v string) (FinetuneName, error)
type FinetuneParameter ¶
type FinetuneParameter interface {
Model() string
Task() string
Hyperparameters() map[string]string
}
func NewFinetuneParameter ¶
func NewFinetuneParameter(model, task string, hyperparameters map[string]string) ( FinetuneParameter, error, )
type FinetuneParameterConfig ¶
type FinetuneSummary ¶
type FinetuneSummary struct {
Id string
Name FinetuneName
CreatedAt int64
FinetuneJobDetail
}
type FinetuneUserInfo ¶
type FinetuneUserInfo struct {
Expiry int64
}
type Inference ¶
type Inference struct {
InferenceInfo
// following fileds is not under the controlling of version
InferenceDetail
}
type InferenceDetail ¶
type InferenceIndex ¶
type InferenceIndex struct {
Project ResourceIndex
Id string
LastCommit string
}
type InferenceInfo ¶
type InferenceInfo struct {
InferenceIndex
ProjectName ResourceName
ResourceLevel string
Requester string
}
type Input ¶
type Input struct {
Key CustomizedKey
ResourceRef
}
type InputeFilePath ¶
type InputeFilePath interface {
InputeFilePath() string
}
InputFilePath
func NewInputeFilePath ¶
func NewInputeFilePath(v string) (InputeFilePath, error)
type KeyValue ¶
type KeyValue struct {
Key CustomizedKey
Value CustomizedValue
}
type Like ¶
type Like struct {
CreatedAt int64
ResourceObject
}
type LuoJiaRecord ¶
type LuoJiaRecordIndex ¶
type Model ¶
type Model struct {
Id string
Owner Account
Protocol ProtocolName
ModelModifiableProperty
RepoId string
RelatedDatasets RelatedResources
CreatedAt int64
UpdatedAt int64
Version int
// following fileds is not under the controlling of version
LikeCount int
DownloadCount int
RelatedProjects RelatedResources
}
func (*Model) MaxRelatedResourceNum ¶
func (*Model) RelatedResources ¶
func (m *Model) RelatedResources() []ResourceObjects
func (*Model) ResourceIndex ¶
func (m *Model) ResourceIndex() ResourceIndex
func (*Model) ResourceObject ¶
func (m *Model) ResourceObject() (ResourceObject, RepoType)
type ModelModifiableProperty ¶
type ModelModifiableProperty struct {
Name ResourceName
Desc ResourceDesc
Title ResourceTitle
RepoType RepoType
Tags []string
TagKinds []string
}
type ModelSummary ¶
type ModelSummary struct {
Id string
Owner Account
Name ResourceName
Desc ResourceDesc
Title ResourceTitle
Tags []string
UpdatedAt int64
LikeCount int
DownloadCount int
}
type Project ¶
type Project struct {
Id string
Owner Account
Type ProjType
Protocol ProtocolName
Training TrainingPlatform
ProjectModifiableProperty
RepoId string
RelatedModels RelatedResources
RelatedDatasets RelatedResources
CreatedAt int64
UpdatedAt int64
Version int
// following fileds is not under the controlling of version
LikeCount int
ForkCount int
DownloadCount int
}
func (*Project) MaxRelatedResourceNum ¶
func (*Project) RelatedResources ¶
func (p *Project) RelatedResources() []ResourceObjects
func (*Project) ResourceIndex ¶
func (p *Project) ResourceIndex() ResourceIndex
func (*Project) ResourceObject ¶
func (p *Project) ResourceObject() (ResourceObject, RepoType)
type ProjectModifiableProperty ¶
type ProjectModifiableProperty struct {
Name ResourceName
Desc ResourceDesc
Title ResourceTitle
CoverId CoverId
RepoType RepoType
Tags []string
TagKinds []string
Level ResourceLevel
}
type ProjectSummary ¶
type ProjectSummary struct {
Id string
Owner Account
Name ResourceName
Desc ResourceDesc
Title ResourceTitle
Level ResourceLevel
CoverId CoverId
Tags []string
UpdatedAt int64
LikeCount int
ForkCount int
DownloadCount int
}
type ProtocolName ¶
type ProtocolName interface {
ProtocolName() string
}
ProtocolName
func NewProtocolName ¶
func NewProtocolName(v string) (ProtocolName, error)
type QuestionSubmission ¶
type QuestionSubmissionInfo ¶
type RelatedResources ¶
type RelatedResources []ResourceIndex
func (RelatedResources) Count ¶
func (r RelatedResources) Count() int
func (RelatedResources) Has ¶
func (r RelatedResources) Has(index *ResourceIndex) bool
type RepoDownloadedEvent ¶
type RepoDownloadedEvent struct {
Account Account
Name string
RepoId string
Obj ResourceObject
}
type ResourceDesc ¶
type ResourceDesc interface {
ResourceDesc() string
DomainValue
}
ResourceDesc
func NewResourceDesc ¶
func NewResourceDesc(v string) (ResourceDesc, error)
type ResourceIndex ¶
type ResourceLevel ¶
ResourceLevel
func NewResourceLevel ¶
func NewResourceLevel(v string) ResourceLevel
func NewResourceLevelByNum ¶
func NewResourceLevelByNum(v int) ResourceLevel
type ResourceLikedEvent ¶
type ResourceLikedEvent struct {
Account Account
Obj ResourceObject
}
type ResourceName ¶
Name
func NewEmptyResourceName ¶
func NewEmptyResourceName() ResourceName
func NewResourceName ¶
func NewResourceName(v string) (ResourceName, error)
type ResourceObject ¶
type ResourceObject struct {
Type ResourceType
ResourceIndex
}
ResourceObject
func (*ResourceObject) String ¶
func (r *ResourceObject) String() string
type ResourceObjects ¶
type ResourceObjects struct {
Type ResourceType
Objects []ResourceIndex
}
type ResourceRef ¶
type ResourceRef struct {
User Account
Type ResourceType
RepoId string
File InputeFilePath
Name ResourceName
}
type ResourceSummary ¶
type ResourceSummary struct {
Owner Account
Name ResourceName
Id string
RepoId string
RepoType RepoType
}
func (*ResourceSummary) IsOnline ¶
func (s *ResourceSummary) IsOnline() bool
func (*ResourceSummary) IsPrivate ¶
func (s *ResourceSummary) IsPrivate() bool
func (*ResourceSummary) IsPublic ¶
func (s *ResourceSummary) IsPublic() bool
func (*ResourceSummary) ResourceIndex ¶
func (s *ResourceSummary) ResourceIndex() ResourceIndex
type ResourceTitle ¶
type ResourceTitle interface {
ResourceTitle() string
DomainValue
}
ResourceTitle
func NewResourceTitle ¶
func NewResourceTitle(v string) (ResourceTitle, error)
type ResourceType ¶
type ResourceType interface {
ResourceType() string
}
ResourceType
func NewResourceType ¶
func NewResourceType(v string) (ResourceType, error)
type ReverselyRelatedResourceInfo ¶
type ReverselyRelatedResourceInfo struct {
Promoter *ResourceIndex
Resource *ResourceIndex
}
type TrainingConfig ¶
type TrainingConfig struct {
ProjectName ResourceName
ProjectRepoId string
Name TrainingName
Desc TrainingDesc
CodeDir Directory
BootFile FilePath
Hyperparameters []KeyValue
Env []KeyValue
Inputs []Input
EnableOutput bool
EnableAim bool
Compute Compute
}
type TrainingCreatedEvent ¶
type TrainingCreatedEvent struct {
Account Account
TrainingIndex TrainingIndex
TrainingInputs []Input
}
training
type TrainingDesc ¶
type TrainingDesc interface {
TrainingDesc() string
}
TrainingDesc
func NewTrainingDesc ¶
func NewTrainingDesc(v string) (TrainingDesc, error)
type TrainingIndex ¶
type TrainingIndex struct {
Project ResourceIndex
TrainingId string
}
type TrainingName ¶
type TrainingName interface {
TrainingName() string
}
TrainingName
func NewTrainingName ¶
func NewTrainingName(v string) (TrainingName, error)
type TrainingPlatform ¶
type TrainingPlatform interface {
TrainingPlatform() string
}
TrainingPlatform
func NewTrainingPlatform ¶
func NewTrainingPlatform(v string) (TrainingPlatform, error)
type TrainingSummary ¶
type TrainingSummary struct {
Id string
Name TrainingName
Desc TrainingDesc
Error string
Status string
Duration int
CreatedAt int64
}
type UserLuoJiaRecord ¶
type UserLuoJiaRecord struct {
User Account
LuoJiaRecord
}
type UserSignedInEvent ¶
type UserSignedInEvent struct {
Account Account
}
type UserTraining ¶
type WuKongPicture ¶
type WuKongPicture struct {
Id string
Owner Account
OBSPath string
Level WuKongPictureLevel
Diggs []string
DiggCount int
Version int
CreatedAt string
WuKongPictureMeta
}
type WuKongPictureDesc ¶
type WuKongPictureDesc interface {
WuKongPictureDesc() string
}
WuKongPictureDesc
func NewWuKongPictureDesc ¶
func NewWuKongPictureDesc(v string) (WuKongPictureDesc, error)
type WuKongPictureLevel ¶
wukong level
func NewWuKongPictureLevel ¶
func NewWuKongPictureLevel(v string) WuKongPictureLevel
func NewWuKongPictureLevelByNum ¶
func NewWuKongPictureLevelByNum(v int) WuKongPictureLevel
type WuKongPictureMeta ¶
type WuKongPictureMeta struct {
Style string
Desc WuKongPictureDesc
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.