From 3b8271800dd098605174fc909df8b117996b2938 Mon Sep 17 00:00:00 2001
From: Quarto GHA Workflow Runner zero_first
runs the wrapped context so that rank 0 runs first before other ranks
-
-
zero_only
-Context manager that only runs the enclosed block on the main rank.
-
utils.distributed.is_main_process()utils.distributed.is_main_process(use_environ=False)Check if the current process is the main process. If not in distributed mode,
always return True.
Args: +- use_environ (bool, optional): Use environment variable to determine main process.
+Returns:
+- bool: True if the current process is the main process, False otherwise.
utils.distributed.zero_first(is_main)runs the wrapped context so that rank 0 runs first before other ranks
-utils.distributed.zero_only()Context manager that only runs the enclosed block on the main rank.