hyperparametertuningjob

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

README

Package hyperparametertuningjob

This package contains the hyperparameter tuning job controller, its tests, and helper types and functions.

Documentation

Index

Constants

View Source
const (
	MaxHyperParameterTuningJobNameLength = 32
)

Defines the maximum number of characters in a SageMaker HyperParameter Job name

View Source
const (
	ReconcilingTuningJobStatus = "ReconcilingTuningJob"
)

Status used when no SageMaker status is available

Variables

This section is empty.

Functions

This section is empty.

Types

type HPOTrainingJobSpawner

type HPOTrainingJobSpawner interface {
	// Spawn TrainingJobs associated with the given HPO job that do not already exist in Kubernetes.
	SpawnMissingTrainingJobs(ctx context.Context, hpoJob hpojobv1.HyperparameterTuningJob)

	// Delete TrainingJobs in Kuberentes that are associated with the given HPO job.
	DeleteSpawnedTrainingJobs(ctx context.Context, hpoJob hpojobv1.HyperparameterTuningJob) error
}

HPOTrainingJobSpawner is a simple utility for creating and deleting Kubernetes TrainingJobs that track SageMaker TrainingJobs that were started by a given HPO job.

func NewHPOTrainingJobSpawner

func NewHPOTrainingJobSpawner(k8sClient client.Client, log logr.Logger, sageMakerClient clientwrapper.SageMakerClientWrapper) HPOTrainingJobSpawner

NewHPOTrainingJobSpawner constructs a new HPOTrainingJobSpawner.

type HPOTrainingJobSpawnerProvider

type HPOTrainingJobSpawnerProvider func(k8sClient client.Client, log logr.Logger, sageMakerClient clientwrapper.SageMakerClientWrapper) HPOTrainingJobSpawner

HPOTrainingJobSpawnerProvider constructs an HPO Training Job Spawner

type Reconciler

type Reconciler struct {
	client.Client
	Log          logr.Logger
	PollInterval time.Duration
	// contains filtered or unexported fields
}

Reconciler reconciles a HyperparameterTuningJob object

func NewHyperparameterTuningJobReconciler

func NewHyperparameterTuningJobReconciler(client client.Client, log logr.Logger, pollInterval time.Duration) *Reconciler

NewHyperparameterTuningJobReconciler creates a new reconciler with the default SageMaker client.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

Reconcile attempts to reconcile the SageMaker resource state with the k8s desired state.

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager configures the manager to recognise the controller.

Jump to

Keyboard shortcuts

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