Skip to content

Commit

Permalink
[Model Monitoring] raise error when deploying with set_tracking and o…
Browse files Browse the repository at this point in the history
…ld client [1.6.x] (#5507)
  • Loading branch information
davesh0812 committed May 6, 2024
1 parent d777f65 commit c2e9737
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions server/api/api/endpoints/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,15 @@ def _deploy_serving_monitoring(
model_monitoring_access_key,
client_version,
):
if (
fn.spec.image.startswith("mlrun/")
and client_version
and semver.Version.parse(client_version) <= semver.Version.parse("1.6.2")
):
raise mlrun.errors.MLRunBadRequestError(
"On deploy of serving-functions which is based on mlrun image "
"('mlrun/') and with set-tracking enabled, client version must be >= 1.6.3"
)
try:
# Handle model monitoring
logger.info("Tracking enabled, initializing model monitoring")
Expand All @@ -831,15 +840,6 @@ def _deploy_serving_monitoring(

overwrite_stream = False
if not mlrun.mlconf.is_ce_mode():
if (
fn.spec.image.startswith("mlrun/")
and client_version
and semver.Version.parse(client_version) < semver.Version.parse("1.6.3")
):
raise mlrun.errors.MLRunBadRequestError(
"On deploy of serving-functions which is based on mlrun image "
"('mlrun/') and with set-tracking enabled, client version must be >= 1.6.3"
)
if not monitoring_deployment.is_monitoring_stream_has_the_new_stream_trigger(
project=fn.metadata.project,
db_session=db_session,
Expand Down

0 comments on commit c2e9737

Please sign in to comment.