tuning

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNumProcesses = "1"
	DefaultNumMachines  = "1"
	DefaultMachineRank  = "0"
	DefaultGPUIds       = "all"
)
View Source
const (
	Port5000                = int32(5000)
	TuningFile              = "/workspace/tfs/fine_tuning.py"
	DefaultBaseDir          = "/mnt"
	DefaultOutputVolumePath = "/mnt/output"
)

Variables

View Source
var (
	DefaultAccelerateParams = map[string]string{
		"num_processes": DefaultNumProcesses,
		"num_machines":  DefaultNumMachines,
		"machine_rank":  DefaultMachineRank,
		"gpu_ids":       DefaultGPUIds,
	}

	DefaultImagePullSecrets = []corev1.LocalObjectReference{}
)

Functions

func CreatePresetTuning

func CreatePresetTuning(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, revisionNum string,
	tuningObj *model.PresetParam, kubeClient client.Client) (client.Object, error)

func GetOutputDirFromTrainingArgs

func GetOutputDirFromTrainingArgs(trainingArgs map[string]runtime.RawExtension) (string, *apis.FieldError)

GetOutputDirFromTrainingArgs retrieves the output directory from training arguments if specified.

func GetTrainingOutputDir

func GetTrainingOutputDir(ctx context.Context, configMap *corev1.ConfigMap) (string, error)

GetTrainingOutputDir retrieves and validates the output directory from the ConfigMap.

func GetTuningImageInfo

func GetTuningImageInfo(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, presetObj *model.PresetParam) (string, []corev1.LocalObjectReference)

func PrepareOutputDir

func PrepareOutputDir(outputDir string) (string, error)

PrepareOutputDir ensures the output directory is within the base directory.

func SetupTrainingOutputVolume

func SetupTrainingOutputVolume(ctx context.Context, configMap *corev1.ConfigMap) (corev1.Volume, corev1.VolumeMount, string)

SetupTrainingOutputVolume adds shared volume for results dir

Types

This section is empty.

Jump to

Keyboard shortcuts

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