(output_dir, host_id=None)
Checkpoint data counters.
Checkpoint data counters.
Checkpoint data counters .
def save_data_counters(output_dir, host_id=None):
  """Checkpoint data counters."""
  global data_counters
  host_id = jax.process_index() if host_id is None else host_id
  fname = os.path.join(output_dir, 'data_counters%d.pkl' % host_id)
  with tf.io.gfile.GFile(fname, 'wb') as f:
    pickle.dump(data_counters, f)
def save_data_counters ( output_dir , host_id = None ) : global data_counters host_id = jax . process_index ( ) if host_id is None else host_id fname = os . path . join ( output_dir , 'data_counters%d.pkl' % host_id ) with tf . io . gfile . GFile ( fname , 'wb' ) as f : pickle . dump ( data_counters , f )