trainingimpl

package
v0.0.0-...-5264247 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTraining

func NewTraining(cfg *Config) (training.Training, error)

Types

type Config

type Config struct {
	OBS           OBSConfig           `json:"obs"         required:"true"`
	Train         TrainingConfig      `json:"train"       required:"true"`
	Modelarts     ModelartsConfig     `json:"modelarts"   required:"true"`
	SyncAndUpload SyncAndUploadConfig `json:"sync"        required:"true"`
}

func (*Config) SetDefault

func (cfg *Config) SetDefault()

func (*Config) Validate

func (cfg *Config) Validate() error

type ModelartsConfig

type ModelartsConfig struct {
	AccessKey   string `json:"access_key" required:"true"`
	SecretKey   string `json:"secret_key" required:"true"`
	Region      string `json:"region" required:"true"`
	ProjectName string `json:"project_name" required:"true"`
	ProjectId   string `json:"project_id" required:"true"`

	// modelarts endpoint
	Endpoint string `json:"endpoint" required:"true"`
}

type OBSConfig

type OBSConfig struct {
	AccessKey string `json:"access_key"    required:"true"`
	SecretKey string `json:"secret_key"    required:"true"`
	Endpoint  string `json:"endpoint"      required:"true"`
	Bucket    string `json:"bucket"        required:"true"`
}

type SyncAndUploadConfig

type SyncAndUploadConfig struct {
	RepoPath      string `json:"repo_path"                required:"true"`
	CommitFile    string `json:"commit_file"              required:"true"`
	OBSUtilPath   string `json:"obsutil_path"             required:"true"`
	SyncWorkDir   string `json:"sync_work_dir"            required:"true"`
	SyncFileShell string `json:"sync_file_shell"          required:"true"`

	UploadWorkDir     string `json:"upload_work_dir"      required:"true"`
	UploadFolderShell string `json:"upload_folder_shell"  required:"true"`

	// DownloadExpiry specifies the timeout to download a obs file.
	// The unit is second.
	DownloadExpiry int `json:"download_expiry"`
}

type TrainingConfig

type TrainingConfig struct {
	LogDir    string `json:"log_dir"`
	AimKey    string `json:"aim_key"`
	AimDir    string `json:"aim_dir"`
	OutputKey string `json:"output_key"`
	OutputDir string `json:"output_dir"`
}

Jump to

Keyboard shortcuts

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