Skip to content

Commit

Permalink
feat(lmeval): Disable online evaluation (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruivieira authored Nov 28, 2024
1 parent 73658e4 commit 2f6af1a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controllers/lmes/lmevaljob_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,10 @@ func CreatePod(svcOpts *serviceOptions, job *lmesv1alpha1.LMEvalJob, log logr.Lo
Name: "TRANSFORMERS_OFFLINE",
Value: "1",
},
{
Name: "HF_EVALUATE_OFFLINE",
Value: "1",
},
}
envVars = append(envVars, offlineHuggingFaceEnvVars...)

Expand Down
36 changes: 36 additions & 0 deletions controllers/lmes/lmevaljob_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ func Test_SimplePod(t *testing.T) {
Name: "TRANSFORMERS_OFFLINE",
Value: "1",
},
{
Name: "HF_EVALUATE_OFFLINE",
Value: "1",
},
},
},
},
Expand Down Expand Up @@ -341,6 +345,10 @@ func Test_WithCustomPod(t *testing.T) {
Name: "TRANSFORMERS_OFFLINE",
Value: "1",
},
{
Name: "HF_EVALUATE_OFFLINE",
Value: "1",
},
},
},
{
Expand Down Expand Up @@ -527,6 +535,10 @@ func Test_EnvSecretsPod(t *testing.T) {
Name: "TRANSFORMERS_OFFLINE",
Value: "1",
},
{
Name: "HF_EVALUATE_OFFLINE",
Value: "1",
},
},
Command: generateCmd(svcOpts, job),
Args: generateArgs(svcOpts, job, log),
Expand Down Expand Up @@ -677,6 +689,10 @@ func Test_FileSecretsPod(t *testing.T) {
Name: "TRANSFORMERS_OFFLINE",
Value: "1",
},
{
Name: "HF_EVALUATE_OFFLINE",
Value: "1",
},
},
VolumeMounts: []corev1.VolumeMount{
{
Expand Down Expand Up @@ -1126,6 +1142,10 @@ func Test_ManagedPVC(t *testing.T) {
Name: "TRANSFORMERS_OFFLINE",
Value: "1",
},
{
Name: "HF_EVALUATE_OFFLINE",
Value: "1",
},
},

VolumeMounts: []corev1.VolumeMount{
Expand Down Expand Up @@ -1265,6 +1285,10 @@ func Test_ExistingPVC(t *testing.T) {
Name: "TRANSFORMERS_OFFLINE",
Value: "1",
},
{
Name: "HF_EVALUATE_OFFLINE",
Value: "1",
},
},
VolumeMounts: []corev1.VolumeMount{
{
Expand Down Expand Up @@ -1421,6 +1445,10 @@ func Test_PVCPreference(t *testing.T) {
Name: "TRANSFORMERS_OFFLINE",
Value: "1",
},
{
Name: "HF_EVALUATE_OFFLINE",
Value: "1",
},
},
VolumeMounts: []corev1.VolumeMount{
{
Expand Down Expand Up @@ -1608,6 +1636,10 @@ func Test_OfflineMode(t *testing.T) {
Name: "TRANSFORMERS_OFFLINE",
Value: "1",
},
{
Name: "HF_EVALUATE_OFFLINE",
Value: "1",
},
},
VolumeMounts: []corev1.VolumeMount{
{
Expand Down Expand Up @@ -1772,6 +1804,10 @@ func Test_OfflineModeWithOutput(t *testing.T) {
Name: "TRANSFORMERS_OFFLINE",
Value: "1",
},
{
Name: "HF_EVALUATE_OFFLINE",
Value: "1",
},
},
VolumeMounts: []corev1.VolumeMount{
{
Expand Down

0 comments on commit 2f6af1a

Please sign in to comment.