Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
matbun committed Oct 31, 2024
1 parent 48be288 commit cd7e8f9
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions tests/torch/test_distribtued.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
DeepSpeedStrategy,
HorovodStrategy
)
from unittest.mock import MagicMock, patch
from unittest.mock import patch
from itwinai.torch.type import UninitializedStrategyError, DistributedStrategyError
from torch.utils.data import Dataset, DataLoader, DistributedSampler
import torch.nn as nn
Expand Down Expand Up @@ -279,25 +279,3 @@ def test_distributed_model(self, strategy, simple_model, optimizer):
assert hasattr(dist_optimizer, 'synchronize'), (
"synchronize() method not found for Horovod optimizer"
)

# Conftest.py content for distributed test configuration


# @pytest.fixture(autouse=True)
# def cuda_available():
# if not torch.cuda.is_available():
# pytest.skip("CUDA not available")


# def pytest_configure(config):
# config.addinivalue_line(
# "markers", "distributed: mark test to run only in distributed environment"
# )


# def pytest_collection_modifyitems(config, items):
# if "WORLD_SIZE" not in os.environ or os.environ["WORLD_SIZE"] == "1":
# skip_distributed = pytest.mark.skip(reason="need distributed environment to run")
# for item in items:
# if "distributed" in item.keywords:
# item.add_marker(skip_distributed)

0 comments on commit cd7e8f9

Please sign in to comment.