dmlcloud.print_root

dmlcloud.print_root(*values, sep=' ', end='\n', file=None, flush=True)

Print the values to a stream if the current rank is the root rank.

Default is to print to the standard output stream.

Parameters:
  • msg (str) – The message to print.

  • sep (str, optional) – The separator between arguments. Default is a space.

  • end (str, optional) – The string to append at the end of the message. Default is a newline.

  • file (file, optional) – The file to write the message to. Default is None.

  • flush (bool, optional) – If True, the output buffer is flushed. Default is True.