Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion hessian/model_debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def full_eval(self,
self._stored_metrics,
remove_leaf_tuples(flax.core.unfreeze(all_metrics)))

if self._metrics_logger and jax.host_id() == 0:
if self._metrics_logger and jax.process_index() == 0:
self._maybe_save_metrics(step)

return all_metrics
2 changes: 1 addition & 1 deletion init2winit/dataset_lib/imagenet_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def map(self, features):
# Grain currently doesn't support the `ds.enumerate()`
# functionality, they suggested moving mixup to the training loop where we
# can access the step number.
batch_index = features[grain.INDEX][0] // jax.host_count()
batch_index = features[grain.INDEX][0] // jax.process_count()
seed = tf.random.experimental.stateless_fold_in(
self.initial_seed, batch_index
)
Expand Down
4 changes: 2 additions & 2 deletions init2winit/mt_eval/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ def main(unused_argv):
if jax.process_index() == 0:
logging.info('argv:\n%s', ' '.join(sys.argv))
logging.info('device_count: %d', jax.device_count())
logging.info('num_hosts : %d', jax.host_count())
logging.info('host_id : %d', jax.host_id())
logging.info('num_hosts : %d', jax.process_count())
logging.info('host_id : %d', jax.process_index())

model_class = models.get_model(model_name)
dataset_builder = datasets.get_dataset(dataset_name)
Expand Down
Loading