Skip to content

Commit

Permalink
[Model Monitoring] Enable explicit ack for V3IO streams (mlrun#5071)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtopper committed Feb 6, 2024
1 parent 4c93fb9 commit d407c53
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions server/api/crud/model_monitoring/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,15 +669,18 @@ def _apply_stream_trigger(
function_name=function_name,
)
if stream_path.startswith("v3io://"):
kwargs = {}
if function_name != mm_constants.MonitoringFunctionNames.STREAM:
kwargs["access_key"] = model_monitoring_access_key
if mlrun.mlconf.is_explicit_ack():
kwargs["explicit_ack_mode"] = "explicitOnly"
kwargs["workerAllocationMode"] = "static"

# Generate V3IO stream trigger
function.add_v3io_stream_trigger(
stream_path=stream_path,
name="monitoring_stream_trigger"
if function_name is None
else f"monitoring_{function_name}_trigger",
access_key=model_monitoring_access_key
if function_name != mm_constants.MonitoringFunctionNames.STREAM
else None,
name=f"monitoring_{function_name or 'stream'}_trigger",
**kwargs,
)
# Add the default HTTP source
http_source = mlrun.datastore.sources.HttpSource()
Expand Down

0 comments on commit d407c53

Please sign in to comment.