You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def setup_env_ranks() -> tp.Tuple[int, int, int]:
# Map MPI environment variables to those expected by DeepSpeed/PyTorch
if 'OMPI_COMM_WORLD_LOCAL_RANK' in os.environ:
os.environ['LOCAL_RANK'] = os.environ['OMPI_COMM_WORLD_LOCAL_RANK']
os.environ['RANK'] = os.environ['OMPI_COMM_WORLD_RANK']
os.environ['WORLD_SIZE'] = os.environ['OMPI_COMM_WORLD_SIZE']
else:
raise EnvironmentError(
"MPI environment variables are not set. "
"Ensure you are running the script with an MPI-compatible launcher."
)
setup_env_ranks()
the function should set the env vars but instaed it raises the error
The text was updated successfully, but these errors were encountered:
if 'OMPI_COMM_WORLD_LOCAL_RANK' in os.environ:
os.environ['LOCAL_RANK'] = os.environ['OMPI_COMM_WORLD_LOCAL_RANK']
os.environ['RANK'] = os.environ['OMPI_COMM_WORLD_RANK']
os.environ['WORLD_SIZE'] = os.environ['OMPI_COMM_WORLD_SIZE']
else:
raise EnvironmentError(
"MPI environment variables are not set. "
"Ensure you are running the script with an MPI-compatible launcher."
)
the function should set the env vars but instaed it raises the error
The text was updated successfully, but these errors were encountered: