objects

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobConfig

type JobConfig struct {
	BackEnd  string            `json:"backend"`
	Brokers  []config.Broker   `json:"brokers,omitempty"`
	Registry config.Registry   `json:"registry,omitempty"`
	Job      JobIdName         `json:"job"`
	Role     string            `json:"role"`
	Realm    string            `json:"realm"`
	Channels []openapi.Channel `json:"channels"`
	// Groups is a map of group name to group id
	// structure: channelName:groupName
	GroupAssociation map[string]string `json:"groupAssociation"`

	MaxRunTime      int32                  `json:"maxRunTime,omitempty"`
	BaseModel       openapi.BaseModel      `json:"baseModel,omitempty"`
	Hyperparameters map[string]interface{} `json:"hyperparameters,omitempty"`
	Dependencies    []string               `json:"dependencies,omitempty"`
	DatasetUrl      string                 `json:"dataset,omitempty"`
	Optimizer       openapi.Optimizer      `json:"optimizer,omitempty"`
	Selector        openapi.Selector       `json:"selector,omitempty"`
}

func (*JobConfig) Configure

func (cfg *JobConfig) Configure(
	jobSpec *openapi.JobSpec,
	brokers []config.Broker,
	registry config.Registry,
	role openapi.Role,
	channels []openapi.Channel,
)

type JobIdName

type JobIdName struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type Task

type Task struct {
	JobId     string `json:"jobid"`
	TaskId    string `json:"taskid"`
	Role      string `json:"role"`
	Key       string `json:"key"`
	ComputeId string `json:"computeid"`

	// the following are config and code
	JobConfig  JobConfig
	ZippedCode []byte
}

func (*Task) GenerateTaskId added in v0.2.2

func (tsk *Task) GenerateTaskId(idx int)

Jump to

Keyboard shortcuts

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