Skip to content

Commit

Permalink
[Feature] [ML] GPU Jobs (#1549)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajanikow authored Dec 21, 2023
1 parent df65970 commit de4def4
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
- (Feature) (ML) Multi DB Settings
- (Feature) (ML) Port adjustments
- (Feature) (ML) Support for deployments with JWT auth enabled
- (Feature) (ML) GPU Jobs

## [1.2.35](https://github.com/arangodb/kube-arangodb/tree/1.2.35) (2023-11-06)
- (Maintenance) Update go-driver to v1.6.0, update IsNotFound() checks
Expand Down
36 changes: 33 additions & 3 deletions docs/api/ArangoMLExtension.V1Alpha1.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ Links:

***

### .spec.deployment.prediction.gpu

Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L31)</sup>

GPU defined if GPU Jobs are enabled for component. In use only for ArangoMLExtensionSpecDeploymentComponentPrediction and ArangoMLExtensionSpecDeploymentComponentTraining

Default Value: `false`

***

### .spec.deployment.prediction.image

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/shared/v1/image.go#L31)</sup>
Expand All @@ -76,7 +86,7 @@ Image define image details

### .spec.deployment.prediction.port

Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L30)</sup>
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L34)</sup>

Port defines on which port the container will be listening for connections

Expand Down Expand Up @@ -122,6 +132,16 @@ Links:

***

### .spec.deployment.project.gpu

Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L31)</sup>

GPU defined if GPU Jobs are enabled for component. In use only for ArangoMLExtensionSpecDeploymentComponentPrediction and ArangoMLExtensionSpecDeploymentComponentTraining

Default Value: `false`

***

### .spec.deployment.project.image

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/shared/v1/image.go#L31)</sup>
Expand All @@ -132,7 +152,7 @@ Image define image details

### .spec.deployment.project.port

Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L30)</sup>
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L34)</sup>

Port defines on which port the container will be listening for connections

Expand Down Expand Up @@ -240,6 +260,16 @@ Links:

***

### .spec.deployment.training.gpu

Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L31)</sup>

GPU defined if GPU Jobs are enabled for component. In use only for ArangoMLExtensionSpecDeploymentComponentPrediction and ArangoMLExtensionSpecDeploymentComponentTraining

Default Value: `false`

***

### .spec.deployment.training.image

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/shared/v1/image.go#L31)</sup>
Expand All @@ -250,7 +280,7 @@ Image define image details

### .spec.deployment.training.port

Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L30)</sup>
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L34)</sup>

Port defines on which port the container will be listening for connections

Expand Down
11 changes: 11 additions & 0 deletions pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,24 @@ import (
)

type ArangoMLExtensionSpecDeploymentComponent struct {
// GPU defined if GPU Jobs are enabled for component. In use only for ArangoMLExtensionSpecDeploymentComponentPrediction and ArangoMLExtensionSpecDeploymentComponentTraining
// +doc/default: false
GPU *bool `json:"gpu,omitempty"`

// Port defines on which port the container will be listening for connections
Port *int32 `json:"port,omitempty"`

// ContainerTemplate Keeps the information about Container configuration
*sharedApi.ContainerTemplate `json:",inline"`
}

func (s *ArangoMLExtensionSpecDeploymentComponent) GetGPU() bool {
if s == nil || s.GPU == nil {
return false
}
return *s.GPU
}

func (s *ArangoMLExtensionSpecDeploymentComponent) GetPort(def int32) int32 {
if s == nil || s.Port == nil {
return def
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/ml/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions pkg/crd/crds/ml-extension.schema.generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@ v1alpha1:
prediction:
description: Prediction defines how Prediction workload will be deployed
properties:
gpu:
description: GPU defined if GPU Jobs are enabled for component. In use only for ArangoMLExtensionSpecDeploymentComponentPrediction and ArangoMLExtensionSpecDeploymentComponentTraining
type: boolean
image:
description: Image define image details
type: string
Expand Down Expand Up @@ -476,6 +479,9 @@ v1alpha1:
project:
description: Project defines how Project workload will be deployed
properties:
gpu:
description: GPU defined if GPU Jobs are enabled for component. In use only for ArangoMLExtensionSpecDeploymentComponentPrediction and ArangoMLExtensionSpecDeploymentComponentTraining
type: boolean
image:
description: Image define image details
type: string
Expand Down Expand Up @@ -612,6 +618,9 @@ v1alpha1:
training:
description: Training defines how Training workload will be deployed
properties:
gpu:
description: GPU defined if GPU Jobs are enabled for component. In use only for ArangoMLExtensionSpecDeploymentComponentPrediction and ArangoMLExtensionSpecDeploymentComponentTraining
type: boolean
image:
description: Image define image details
type: string
Expand Down

0 comments on commit de4def4

Please sign in to comment.