Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tensor2tensor/utils/trainer_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ def create_run_config(model_name,
log_step_count_steps=100,
intra_op_parallelism_threads=0,
tpu_config_extra_kwargs=None,
cloud_tpu_name=""):
cloud_tpu_name="",
cloud_tpu_zone=None):
"""Create RunConfig, TPUConfig, and Parallelism object."""
session_config = create_session_config(
log_device_placement=log_device_placement,
Expand Down Expand Up @@ -229,7 +230,7 @@ def create_run_config(model_name,
# Update run_config to use cluster instead of master/evaluation_master
# as we need the cluster spec to use Cloud Pods
tpu_cluster_resolver = contrib.cluster_resolver().TPUClusterResolver(
cloud_tpu_name)
tpu=cloud_tpu_name, zone=cloud_tpu_zone)
run_config_args["cluster"] = tpu_cluster_resolver
del run_config_args["master"]
del run_config_args["evaluation_master"]
Expand Down