Skip to content

Commit ca8ce5b

Browse files
gustavocidornelaswhoseoyster
authored andcommitted
Closes OPEN-3861 Improve stack trace handling when commit bundle is not in a valid state
1 parent 0bd187f commit ca8ce5b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

openlayer/validators.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@ def validate(self) -> List[str]:
161161
"----------------------------------------------------------------------------\n"
162162
)
163163
self._validate_bundle_state()
164-
self._validate_bundle_resources()
164+
165+
# Validate individual resources only if the bundle is in a valid state
166+
# TODO: improve the logic that determines whether to validate individual resources
167+
if not self.failed_validations:
168+
self._validate_bundle_resources()
165169

166170
if not self.failed_validations:
167171
logger.info(
@@ -230,7 +234,7 @@ def _validate_bundle_state(self):
230234
bundle_state_failed_validations.append(
231235
"To push a model to the platform, you must provide "
232236
"training and a validation sets with predictions in the column "
233-
"`predictions_column_name`."
237+
"specified by `predictionsColumnName`."
234238
)
235239
if model_type == "baseline":
236240
if (
@@ -248,7 +252,7 @@ def _validate_bundle_state(self):
248252
bundle_state_failed_validations.append(
249253
"To push a baseline model to the platform, you must provide "
250254
"training and validation sets without predictions in the column "
251-
"`predictions_column_name`."
255+
"specified by `predictionsColumnName`."
252256
)
253257
else:
254258
if (

0 commit comments

Comments
 (0)