Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
schustmi committed Dec 9, 2024
1 parent 36311a2 commit c66a24d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/zenml/zen_stores/sql_zen_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -10400,7 +10400,7 @@ def _get_model_version_id(
if producer_run_id:
query = query.where(
ModelVersionSchema.producer_run_id == producer_run_id,
ModelVersionSchema.is_numeric.is_(True),
col(ModelVersionSchema.is_numeric).is_(True),
)

with Session(self.engine) as session:
Expand Down Expand Up @@ -10596,11 +10596,8 @@ def _create_model_version(
f"{model_version.name}): A model with the "
"same name and version already exists."
)
elif (
producer_run_id
and self._get_model_version_id_for_producer_run(
model_id=model.id, producer_run_id=producer_run_id
)
elif producer_run_id and self._get_model_version_id(
model_id=model.id, producer_run_id=producer_run_id
):
raise RuntimeError(
"Auto-incremented model version already exists for "
Expand Down

0 comments on commit c66a24d

Please sign in to comment.