Skip to content

Commit 8c47f35

Browse files
use PORT variable across the script.
1 parent b516134 commit 8c47f35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/research_projects/pytorch_xla/train_text_to_image_xla.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def start_training(self):
153153
break
154154
if step == measure_start_step and PROFILE_DIR is not None:
155155
xm.wait_device_ops()
156-
xp.trace_detached("localhost:9012", PROFILE_DIR, duration_ms=args.profile_duration)
156+
xp.trace_detached(f"localhost:{PORT}", PROFILE_DIR, duration_ms=args.profile_duration)
157157
last_time = time.time()
158158
loss = self.step_fn(batch["pixel_values"], batch["input_ids"])
159159
self.global_step += 1
@@ -480,7 +480,7 @@ def get_column_names(dataset, args):
480480
def main(args):
481481
args = parse_args()
482482

483-
_ = xp.start_server(9012)
483+
_ = xp.start_server(PORT)
484484

485485
num_devices = xr.global_runtime_device_count()
486486
mesh = xs.get_1d_mesh("data")

0 commit comments

Comments
 (0)