utils

package
v0.0.0-...-764b39c Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputePodSpecResourceRequest

func ComputePodSpecResourceRequest(spec *v1.PodSpec) v1.ResourceList

ComputePodSpecResourceRequest returns the requested resource of the PodSpec

func Failed

func Failed(c *gin.Context, msg string)

func GetTimeDiffer

func GetTimeDiffer(startTime time.Time, endTime time.Time) (differ string)

func Redirect403

func Redirect403(c *gin.Context)

func Redirect404

func Redirect404(c *gin.Context)

func Redirect500

func Redirect500(c *gin.Context)

func Succeed

func Succeed(c *gin.Context, obj interface{})

Types

type ClusterRequestResource

type ClusterRequestResource struct {
	RequestCPU    int64 `json:"requestCPU"`
	RequestMemory int64 `json:"requestMemory"`
	RequestGPU    int64 `json:"requestGPU"`
}

type ClusterTotalResources

type ClusterTotalResources struct {
	TotalCPU    int64 `json:"totalCPU"`
	TotalMemory int64 `json:"totalMemory"`
	TotalGPU    int64 `json:"totalGPU"`
}

type CurrentOptimalTrial

type CurrentOptimalTrial struct {
	ObjectiveName    string            `json:"objectiveName"`
	ObjectiveValue   string            `json:"objectiveValue"`
	ParameterSamples map[string]string `json:"parameterSamples"`
}

type GitHubRepoInfo

type GitHubRepoInfo struct {
	Owner       string `json:"owner"`
	Repo        string `json:"repo"`
	Branch      string `json:"branch"`
	AccessToken string `json:"accessToken"`
}

type LLMServiceVersion

type LLMServiceVersion struct {
	ModelName                string                                    `json:"modelName"`
	Version                  string                                    `json:"version"`
	CreationTime             string                                    `json:"creationTime"`
	AssociatedExperimentSpec morphlingv1alpha1.ProfilingExperimentSpec `json:"associatedExperimentSpec"`
}

type LLMServiceVersionRequest

type LLMServiceVersionRequest struct {
	GitHubRepoInfo    GitHubRepoInfo    `json:"gitHubRepoInfo"`
	LLMServiceVersion LLMServiceVersion `json:"llmServiceVersion"`
}

type MorphlingConfig

type MorphlingConfig struct {
	Namespace       string   `json:"namespace"`
	HttpClientImage string   `json:"http-client-image"`
	HsfClientImage  string   `json:"hsf-client-image"`
	HttpClientYaml  string   `json:"http-client-yaml"`
	HsfClientYaml   string   `json:"hsf-client-yaml"`
	HttpServiceYaml string   `json:"http-service-yaml"`
	HsfServiceYaml  string   `json:"hsf-service-yaml"`
	AlgorithmNames  []string `json:"algorithm-names"`
}

type NodeInfo

type NodeInfo struct {
	NodeName      string `json:"nodeName"`
	InstanceType  string `json:"instanceType"`
	GPUType       string `json:"gpuType"`
	TotalCPU      int64  `json:"totalCPU"`
	TotalMemory   int64  `json:"totalMemory"`
	TotalGPU      int64  `json:"totalGPU"`
	RequestCPU    int64  `json:"requestCPU"`
	RequestMemory int64  `json:"requestMemory"`
	RequestGPU    int64  `json:"requestGPU"`
}

type NodeInfoList

type NodeInfoList struct {
	Items []NodeInfo `json:"items,omitempty"`
}

type ParameterSpec

type ParameterSpec struct {
	Category string `json:"category"`
	Name     string `json:"name"`
	Type     string `json:"type"`
	Space    string `json:"space"`
}

type ProfilingExperimentDetail

type ProfilingExperimentDetail struct {
	Name               string                                   `json:"name"`
	ExperimentUserID   string                                   `json:"UserId,omitempty"`
	ExperimentUserName string                                   `json:"UserName,omitempty"`
	ExperimentStatus   morphlingv1alpha1.ProfilingConditionType `json:"peStatus"`
	Namespace          string                                   `json:"namespace"`
	CreateTime         string                                   `json:"createTime"`
	EndTime            string                                   `json:"endTime"`
	DurationTime       string                                   `json:"durationTime"`

	TrialsTotal          int32                 `json:"trialsTotal"`
	TrialsSucceeded      int32                 `json:"trialsSucceeded"`
	AlgorithmName        string                `json:"algorithmName"`
	MaxNumTrials         int32                 `json:"maxNumTrials"`
	Objective            string                `json:"objective"`
	Parallelism          int32                 `json:"parallelism"`
	Parameters           []ParameterSpec       `json:"parameters"`
	Trials               []TrialSpec           `json:"trials"`
	CurrentOptimalTrials []CurrentOptimalTrial `json:"currentOptimalTrials"`
}

type ProfilingExperimentInfo

type ProfilingExperimentInfo struct {
	Name               string                                   `json:"name"`
	ExperimentUserID   string                                   `json:"UserId,omitempty"`
	ExperimentUserName string                                   `json:"UserName,omitempty"`
	ExperimentStatus   morphlingv1alpha1.ProfilingConditionType `json:"peStatus"`
	Namespace          string                                   `json:"namespace"`
	CreateTime         string                                   `json:"createTime"`
	EndTime            string                                   `json:"endTime"`
	DurationTime       string                                   `json:"durationTime"`
}

type Query

type Query struct {
	Name      string
	Namespace string
	//Region     string
	Status     morphlingv1alpha1.ProfilingConditionType
	StartTime  time.Time
	EndTime    time.Time
	Pagination *QueryPagination
}

type QueryPagination

type QueryPagination struct {
	PageNum  int
	PageSize int
	Count    int
}

type TrialSpec

type TrialSpec struct {
	Name             string            `json:"name"`
	Status           string            `json:"Status"`
	ObjectiveName    string            `json:"objectiveName"`
	ObjectiveValue   string            `json:"objectiveValue"`
	ParameterSamples map[string]string `json:"parameterSamples"`
	CreateTime       string            `json:"createTime"`
}

Jump to

Keyboard shortcuts

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