Skip to content

Commit e07ea0b

Browse files
gustavocidornelaswhoseoyster
authored andcommitted
Fixes buggy logic in commit bundle state validation
1 parent 20aaf6d commit e07ea0b

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

openlayer/validators/commit_validators.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,23 +208,17 @@ def _validate_bundle_state(self):
208208
if (
209209
"training" in self._bundle_resources
210210
or "fine-tuning" in self._bundle_resources
211-
) and "validation" not in self._bundle_resources:
211+
) and ("validation" not in self._bundle_resources):
212212
if outputs_in_training_set:
213213
self.failed_validations.append(
214214
"The training/fine-tuning dataset contains predictions, but no model was"
215215
" provided. To push a training/fine-tuning set with predictions, please provide"
216216
" a model and a validation set with predictions as well."
217217
)
218-
elif (
219-
"training" not in self._bundle_resources
220-
or "fine-tuning" not in self._bundle_resources
221-
) and "validation" in self._bundle_resources:
222-
# This is allowed -- listed just for completeness
223-
pass
224218
elif (
225219
"training" in self._bundle_resources
226220
or "fine-tuning" in self._bundle_resources
227-
) and "validation" in self._bundle_resources:
221+
) and ("validation" in self._bundle_resources):
228222
if outputs_in_training_set or outputs_in_validation_set:
229223
self.failed_validations.append(
230224
"You are trying to push a training/fine-tuning set and a validation set to the platform. "

0 commit comments

Comments
 (0)