Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions api/apps/v1alpha1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,17 @@ type NGCSecret struct {
Key string `json:"key"`
}

// HFSecret represents the secret and key details for HuggingFace.
type HFSecret struct {
// Name of the Kubernetes secret containing HF_TOKEN key
// +kubebuilder:validation:MinLength=1
Name string `json:"name"`

// Key in the key containing the actual token value
// +kubebuilder:default:="HF_TOKEN"
Key string `json:"key"`
}

// PersistentVolumeClaim defines the attributes of PVC.
// +kubebuilder:validation:XValidation:rule="!has(self.create) || !self.create || (has(self.size) && self.size != \"\")", message="size is required for pvc creation"
// +kubebuilder:validation:XValidation:rule="!has(self.create) || !self.create || (has(self.volumeAccessMode) && self.volumeAccessMode != \"\")", message="volumeAccessMode is required for pvc creation"
Expand Down
5 changes: 4 additions & 1 deletion api/apps/v1alpha1/nemo_customizer_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ type ModelDownloadJobsConfig struct {
ImagePullPolicy string `json:"imagePullPolicy,omitempty"`

// NGCSecret is the secret containing the NGC API key
NGCSecret NGCSecret `json:"ngcAPISecret"`
NGCSecret NGCSecret `json:"ngcAPISecret,omitempty"`

// HFSecret is the secret containing the HF_TOKEN key
HFSecret HFSecret `json:"hfSecret,omitempty"`

// Optional security context for the job pods
SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`
Expand Down
32 changes: 18 additions & 14 deletions api/apps/v1alpha1/nemo_evaluator_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,17 @@ type NemoEvaluatorSpec struct {
EvaluationImages EvaluationImages `json:"evaluationImages"`
}

// EvaluationImages for different evaluation targets.
type EvaluationImages struct {
// +kubebuilder:validation:MinLength=1
BigcodeEvalHarness string `json:"bigcodeEvalHarness"`
// +kubebuilder:validation:MinLength=1
LmEvalHarness string `json:"lmEvalHarness"`
// +kubebuilder:validation:MinLength=1
SimilarityMetrics string `json:"similarityMetrics"`
// +kubebuilder:validation:MinLength=1
LlmAsJudge string `json:"llmAsJudge"`
// +kubebuilder:validation:MinLength=1
MtBench string `json:"mtBench"`
// +kubebuilder:validation:MinLength=1
Retriever string `json:"retriever"`
// +kubebuilder:validation:MinLength=1
Rag string `json:"rag"`
BigcodeEvalHarness string `json:"bigcodeEvalHarness,omitempty"`
LmEvalHarness string `json:"lmEvalHarness,omitempty"`
SimilarityMetrics string `json:"similarityMetrics,omitempty"`
LlmAsJudge string `json:"llmAsJudge,omitempty"`
MtBench string `json:"mtBench,omitempty"`
Retriever string `json:"retriever,omitempty"`
Rag string `json:"rag,omitempty"`
BFCL string `json:"bfcl,omitempty"`
AgenticEval string `json:"agenticEval,omitempty"`
}

// NemoEvaluatorStatus defines the observed state of NemoEvaluator.
Expand Down Expand Up @@ -197,6 +193,14 @@ func (ei EvaluationImages) GetEvaluationImageEnv() []corev1.EnvVar {
Name: "RAG",
Value: ei.Rag,
},
{
Comment thread
varunrsekar marked this conversation as resolved.
Name: "BFCL",
Value: ei.BFCL,
},
{
Name: "AGENTIC_EVAL",
Value: ei.AgenticEval,
},
}
}

Expand Down
16 changes: 16 additions & 0 deletions api/apps/v1alpha1/zz_generated.deepcopy.go

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

17 changes: 16 additions & 1 deletion bundle/manifests/apps.nvidia.com_nemocustomizers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,22 @@ spec:
modelDownloadJobs:
description: Model download job configuration
properties:
hfSecret:
description: HFSecret is the secret containing the HF_TOKEN key
properties:
key:
default: HF_TOKEN
description: Key in the key containing the actual token value
type: string
name:
description: Name of the Kubernetes secret containing HF_TOKEN
key
minLength: 1
type: string
required:
- key
- name
type: object
image:
description: Docker image used for model download jobs
minLength: 1
Expand Down Expand Up @@ -664,7 +680,6 @@ spec:
type: integer
required:
- image
- ngcAPISecret
- pollIntervalSeconds
- ttlSecondsAfterFinished
type: object
Expand Down
19 changes: 4 additions & 15 deletions bundle/manifests/apps.nvidia.com_nemoevaluators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,35 +291,24 @@ spec:
description: EvaluationImages defines the external images used for
evaluation
properties:
agenticEval:
type: string
bfcl:
type: string
bigcodeEvalHarness:
minLength: 1
type: string
llmAsJudge:
minLength: 1
type: string
lmEvalHarness:
minLength: 1
type: string
mtBench:
minLength: 1
type: string
rag:
minLength: 1
type: string
retriever:
minLength: 1
type: string
similarityMetrics:
minLength: 1
type: string
required:
- bigcodeEvalHarness
- llmAsJudge
- lmEvalHarness
- mtBench
- rag
- retriever
- similarityMetrics
type: object
expose:
description: ExposeV1 defines attributes to expose the service.
Expand Down
17 changes: 16 additions & 1 deletion config/crd/bases/apps.nvidia.com_nemocustomizers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,22 @@ spec:
modelDownloadJobs:
description: Model download job configuration
properties:
hfSecret:
description: HFSecret is the secret containing the HF_TOKEN key
properties:
key:
default: HF_TOKEN
description: Key in the key containing the actual token value
type: string
name:
description: Name of the Kubernetes secret containing HF_TOKEN
key
minLength: 1
type: string
required:
- key
- name
type: object
image:
description: Docker image used for model download jobs
minLength: 1
Expand Down Expand Up @@ -664,7 +680,6 @@ spec:
type: integer
required:
- image
- ngcAPISecret
- pollIntervalSeconds
- ttlSecondsAfterFinished
type: object
Expand Down
19 changes: 4 additions & 15 deletions config/crd/bases/apps.nvidia.com_nemoevaluators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,35 +291,24 @@ spec:
description: EvaluationImages defines the external images used for
evaluation
properties:
agenticEval:
type: string
bfcl:
type: string
bigcodeEvalHarness:
minLength: 1
type: string
llmAsJudge:
minLength: 1
type: string
lmEvalHarness:
minLength: 1
type: string
mtBench:
minLength: 1
type: string
rag:
minLength: 1
type: string
retriever:
minLength: 1
type: string
similarityMetrics:
minLength: 1
type: string
required:
- bigcodeEvalHarness
- llmAsJudge
- lmEvalHarness
- mtBench
- rag
- retriever
- similarityMetrics
type: object
expose:
description: ExposeV1 defines attributes to expose the service.
Expand Down
36 changes: 36 additions & 0 deletions config/samples/nemo/25.04/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# NeMo Custom Resources

These CRs are designed to deploy NeMo microservices using the NIM Operator.

## Compatible NIM Operator Version

- **NIM Operator v2.0.0**

> Using these CRs with any other version may lead to validation or runtime errors.

## Notes

- The CR schema and fields in this version match the capabilities of NIM Operator v2.0.0.

## Upgrade Notes

If upgrading from a previous NeMo service version (e.g., `25.04`) using the existing operator version:
- Check for renamed or deprecated fields.
- Review updated model config parameters.
- Revalidate against the new CR using:

```bash
kubectl apply --dry-run=server -f apps_v1alpha1_nemodatastore.yaml \
-f apps_v1alpha1_nemocustomizer.yaml \
-f apps_v1alpha1_nemoentitystore.yaml \
-f apps_v1alpha1_nemoguardrails.yaml \
-f apps_v1alpha1_nemoevaluator.yaml
```

```text
nemodatastore.apps.nvidia.com/nemodatastore-sample created (server dry run)
nemocustomizer.apps.nvidia.com/nemocustomizer-sample created (server dry run)
nemoentitystore.apps.nvidia.com/nemoentitystore-sample created (server dry run)
nemoguardrail.apps.nvidia.com/nemoguardrails-sample configured (server dry run)
nemoevaluator.apps.nvidia.com/nemoevaluator-sample created (server dry run)
```
Loading
Loading