Skip to content

Commit

Permalink
use the flag
Browse files Browse the repository at this point in the history
  • Loading branch information
vanbasten23 committed Mar 15, 2024
1 parent b902c29 commit 9ff0f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/spmd/test_train_spmd_imagenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def train_loop_fn(loader, epoch):
if step == profile_step and epoch == profile_epoch:
xm.wait_device_ops()
import tempfile
xp.trace_detached('127.0.0.1:9012', profile_logdir, profile_duration or 20000)
xp.trace_detached(f'127.0.0.1:{FLAGS.profiler_port}', profile_logdir, profile_duration or 20000)

def test_loop_fn(loader, epoch):
total_samples, correct = 0, 0
Expand Down Expand Up @@ -389,7 +389,7 @@ def test_loop_fn(loader, epoch):

if __name__ == '__main__':
if FLAGS.profile:
server = xp.start_server(9012)
server = xp.start_server(FLAGS.profiler_port)

torch.set_default_dtype(torch.float32)
accuracy = train_imagenet()
Expand Down

0 comments on commit 9ff0f31

Please sign in to comment.