Skip to content

Commit

Permalink
Fix pointers for APIs
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Velichkevich <[email protected]>
  • Loading branch information
andreyvelich committed Aug 20, 2024
1 parent 72a933e commit 9d0a686
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion pkg/apis/kubeflow.org/v2alpha1/trainingruntime_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ type MPISpec struct {
NumProcPerNode *int32 `json:"numProcPerNode,omitempty"`

// Implementation name for the MPI to create the appropriate hostfile.
MPIImplementation *MPIImplementation `json:"mpiImplementation"`
// Defaults to OpenMPI.
MPIImplementation MPIImplementation `json:"mpiImplementation,omitempty"`

// Directory where SSH keys are mounted.
SSHAuthMountPath *string `json:"SSHAuthMountPath,omitempty"`
Expand Down
16 changes: 8 additions & 8 deletions pkg/apis/kubeflow.org/v2alpha1/trainjob_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ type TrainingRuntimeRef struct {
// Every training runtime contains `trainer` container which represents Trainer.
type Trainer struct {
// Docker image for the training container.
Image string `json:"image,omitempty"`
Image *string `json:"image,omitempty"`

// Entrypoint commands for the training container.
Command []string `json:"command,omitempty"`
Expand All @@ -125,7 +125,7 @@ type Trainer struct {
NumNodes *int32 `json:"numNodes,omitempty"`

// Compute resources for each training node.
ResourcesPerNode corev1.ResourceRequirements `json:"resourcesPerNode,omitempty"`
ResourcesPerNode *corev1.ResourceRequirements `json:"resourcesPerNode,omitempty"`

// Number of processes/workers/slots on every training node.
// For the Torch runtime: `auto`, `cpu`, `gpu`, or int value can be set.
Expand All @@ -138,14 +138,14 @@ type Trainer struct {
// the `dataset-initializer` container in the `Initializer` Job.
type DatasetConfig struct {
// Storage uri for the dataset provider.
StorageUri string `json:"storageUri"`
StorageUri *string `json:"storageUri,omitempty"`

// List of environment variables to set in the dataset initializer container.
// These values will be merged with the TrainingRuntime's dataset initializer environments.
Env []corev1.EnvVar `json:"env,omitempty"`

// Reference to the TrainJob's secrets to download dataset.
SecretRef corev1.SecretReference `json:"secretRef,omitempty"`
SecretRef *corev1.SecretReference `json:"secretRef,omitempty"`
}

// ModelConfig represents the desired model configuration.
Expand All @@ -164,27 +164,27 @@ type ModelConfig struct {
// InputModel represents the desired pre-trained model configuration.
type InputModel struct {
// Storage uri for the model provider.
StorageUri string `json:"storageUri"`
StorageUri *string `json:"storageUri,omitempty"`

// List of environment variables to set in the model initializer container.
// These values will be merged with the TrainingRuntime's model initializer environments.
Env []corev1.EnvVar `json:"env,omitempty"`

// Reference to the TrainJob's secrets to download model.
SecretRef corev1.SecretReference `json:"secretRef,omitempty"`
SecretRef *corev1.SecretReference `json:"secretRef,omitempty"`
}

// OutputModel represents the desired trained model configuration.
type OutputModel struct {
// Storage uri for the model exporter.
StorageUri string `json:"storageUri"`
StorageUri *string `json:"storageUri,omitempty"`

// List of environment variables to set in the model exporter container.
// These values will be merged with the TrainingRuntime's model exporter environments.
Env []corev1.EnvVar `json:"env,omitempty"`

// Reference to the TrainJob's secrets to export model.
SecretRef corev1.SecretReference `json:"secretRef,omitempty"`
SecretRef *corev1.SecretReference `json:"secretRef,omitempty"`
}

// PodSpecOverrides represents the custom overrides that will be applied for the TrainJob's resources.
Expand Down

0 comments on commit 9d0a686

Please sign in to comment.