Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Model Monitoring] Fix server-side nuclio version resolution in explicit ack switch [1.6.x] #5117

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions mlrun/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,11 +1148,12 @@ def get_s3_storage_options(self) -> typing.Dict[str, typing.Any]:

return storage_options

def is_explicit_ack(self) -> bool:
def is_explicit_ack(self, version=None) -> bool:
if not version:
version = self.nuclio_version
return self.httpdb.nuclio.explicit_ack == "enabled" and (
not self.nuclio_version
or semver.VersionInfo.parse(self.nuclio_version)
>= semver.VersionInfo.parse("1.12.10")
not version
or semver.VersionInfo.parse(version) >= semver.VersionInfo.parse("1.12.10")
)


Expand Down
3 changes: 2 additions & 1 deletion server/api/crud/model_monitoring/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from mlrun.utils import logger
from server.api.api import deps
from server.api.crud.model_monitoring.helpers import Seconds, seconds2minutes
from server.api.utils.runtimes.nuclio import resolve_nuclio_version

_MODEL_MONITORING_COMMON_PATH = (
pathlib.Path(__file__).parents[4] / "mlrun" / "model_monitoring"
Expand Down Expand Up @@ -672,7 +673,7 @@ def _apply_stream_trigger(
kwargs = {}
if function_name != mm_constants.MonitoringFunctionNames.STREAM:
kwargs["access_key"] = model_monitoring_access_key
if mlrun.mlconf.is_explicit_ack():
if mlrun.mlconf.is_explicit_ack(version=resolve_nuclio_version()):
kwargs["explicit_ack_mode"] = "explicitOnly"
kwargs["worker_allocation_mode"] = "static"

Expand Down
Loading