Skip to content

Commit

Permalink
move multiplex metrics task name into class
Browse files Browse the repository at this point in the history
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
  • Loading branch information
zcin committed Jan 22, 2024
1 parent a97a39a commit 929dc6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/ray/serve/multiplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from ray.serve.context import _get_global_client, _get_internal_replica_context

logger = logging.getLogger(SERVE_LOGGER_NAME)
PUSH_MULTIPLEXED_MODEL_IDS_TASK_NAME = "push_multiplexed_model_ids"


class _ModelMultiplexWrapper:
Expand All @@ -35,6 +34,8 @@ class _ModelMultiplexWrapper:
"""

_PUSH_MULTIPLEXED_MODEL_IDS_TASK_NAME = "push_multiplexed_model_ids"

def __init__(
self,
model_load_func: Callable[[str], Any],
Expand Down Expand Up @@ -113,6 +114,7 @@ def __init__(

self.metrics_pusher = MetricsPusher()
self.metrics_pusher.register_task(
self._PUSH_MULTIPLEXED_MODEL_IDS_TASK_NAME,
PUSH_MULTIPLEXED_MODEL_IDS_INTERVAL_S,
self._push_model_ids_info,
PUSH_MULTIPLEXED_MODEL_IDS_INTERVAL_S,
Expand Down

0 comments on commit 929dc6b

Please sign in to comment.