Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Better support for rank_zero_only setting for SLURM and torchelastic #6802

Merged
merged 22 commits into from
Apr 7, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update test_distributed.py
  • Loading branch information
ananthsub committed Apr 7, 2021
commit e4043d98526a78d7836cc15ebf9949d82b8d54dd
4 changes: 2 additions & 2 deletions tests/utilities/test_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import pytest


@pytest.mark.parameterize("env_vars", [{"RANK": "0"}, {"SLURM_PROCID": "0"}])
@pytest.mark.parametrize("env_vars", [{"RANK": "0"}, {"SLURM_PROCID": "0"}])
def test_rank_zero_known_cluster_envs(env_vars: Mapping[str, str]):
""" Test that SLURM environment variables are properly checked for rank_zero_only. """
from pytorch_lightning.utilities.distributed import _get_rank, rank_zero_only
Expand All @@ -36,7 +36,7 @@ def foo(): # The return type is optional because on non-zero ranks it will not
assert x == 1


@pytest.mark.parameterize("rank_key,rank", [
@pytest.mark.parametrize("rank_key,rank", [
("RANK", "1"),
("SLURM_PROCID", "2"),
("LOCAL_RANK", "3"),
Expand Down