INNER CODE UNIT · Python

_startup_event

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:33

def _startup_event() -> None:
  """Loads the trained policy at startup."""
  app_vars["trained_policy"] = tf.saved_model.load(
      os.environ["AIP_STORAGE_URI"])


@app.on_event("startup")
async def startup_event() -> None:
  """Loads the trained policy at startup."""
  _startup_event()


def _health() -> Dict[str, str]:
  """Handles server health check requests.

  Returns:
    An empty dict.
  """

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…