INNER CODE UNIT · Python

get_env_vars

GoogleCloudPlatform/vertex-ai-samples · community-content/tf_agents_bandits_movie_recommendation_with_kfp_and_vertex_sdk/mlops_pipeline_tf_agents_bandits_movie_recommendation/src/logger/main.py:60

def get_env_vars() -> EnvVars:
  """Gets a set of environment variables necessary for `log`.

  Returns:
    A `EnvVars` of environment variables for configuring `log`.
  """
  return EnvVars(
      project_id=os.getenv("PROJECT_ID"),
      raw_data_path=os.getenv("RAW_DATA_PATH"),
      batch_size=int(os.getenv("BATCH_SIZE")),
      rank_k=int(os.getenv("RANK_K")),
      num_actions=int(os.getenv("NUM_ACTIONS")),
      bigquery_tmp_file=os.getenv("BIGQUERY_TMP_FILE"),
      bigquery_dataset_id=os.getenv("BIGQUERY_DATASET_ID"),
      bigquery_location=os.getenv("BIGQUERY_LOCATION"),
      bigquery_table_id=os.getenv("BIGQUERY_TABLE_ID"))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…