INNER CODE UNIT · Python
health
GoogleCloudPlatform/vertex-ai-samples · community-content/tf_agents_bandits_movie_recommendation_with_kfp_and_vertex_sdk/mlops_pipeline_tf_agents_bandits_movie_recommendation/src/prediction_container/main.py:55
def health() -> Dict[str, str]:
"""Handles server health check requests.
Returns:
An empty dict.
"""
return _health()
def _message_logger_via_pubsub(
project_id: str,
logger_pubsub_topic: str,
observations: List[Dict[str, List[List[float]]]],
predicted_actions: List[Dict[str, List[float]]]) -> None:
"""Send a message to the Pub/Sub topic which triggers the Logger.
Package observations and the corresponding predicted actions in a message JSON
and send to Pub/Sub topic.