add uniflow transport tests and enable selection (#165) #647
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Unit Test | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: unit-test-${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash -l -eo pipefail {0} | |
| jobs: | |
| unit_tests: | |
| if: github.repository_owner == 'meta-pytorch' | |
| runs-on: linux.g5.12xlarge.nvidia.gpu | |
| timeout-minutes: 60 | |
| strategy: | |
| matrix: | |
| python-version: ['3.10'] | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@v4 | |
| - name: Setup conda env | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| auto-update-conda: true | |
| miniconda-version: "latest" | |
| activate-environment: test | |
| python-version: ${{ matrix.python-version }} | |
| - name: Update pip | |
| run: python -m pip install --upgrade pip | |
| - name: Install torchstore | |
| run: pip install uv && uv pip install . && uv pip install .[dev] | |
| - name: Run tensor slice tests (test_tensor_slice.py) with coverage | |
| run: | | |
| TORCHSTORE_RDMA_ENABLED=0 \ | |
| USE_TORCHCOMMS_RDMA=0 \ | |
| pytest tests/test_tensor_slice.py \ | |
| --cov=. --cov-report=xml -vv -s | |
| - name: Run test_resharding_basic tests with coverage | |
| # TorchStore RDMA will not run on CPU-only machines | |
| # resharding tests runs for too long. | |
| # test_large_tensors.py can OOM. | |
| run: | | |
| TORCHSTORE_RDMA_ENABLED=0 \ | |
| USE_TORCHCOMMS_RDMA=0 \ | |
| pytest tests/test_resharding_basic.py \ | |
| --cov=. --cov-report=xml -vv -s | |
| - name: Run remaining tests with coverage | |
| # TorchStore RDMA will not run on CPU-only machines | |
| # resharding tests runs for too long. | |
| # test_large_tensors.py can OOM. | |
| # running shared memory in a different process group | |
| run: | | |
| TORCHSTORE_RDMA_ENABLED=0 \ | |
| USE_TORCHCOMMS_RDMA=0 \ | |
| pytest tests/ \ | |
| -k 'not SharedMemory' \ | |
| --ignore=tests/test_resharding_basic.py \ | |
| --ignore=tests/test_resharding_ext.py \ | |
| --ignore=tests/test_tensor_slice.py \ | |
| --ignore=tests/test_large_tensors.py \ | |
| --cov=. --cov-report=xml --cov-append --durations=20 -vv -s | |
| TORCHSTORE_RDMA_ENABLED=0 \ | |
| USE_TORCHCOMMS_RDMA=0 \ | |
| pytest tests/ \ | |
| -k 'SharedMemory' \ | |
| --ignore=tests/test_resharding_basic.py \ | |
| --ignore=tests/test_resharding_ext.py \ | |
| --ignore=tests/test_tensor_slice.py \ | |
| --ignore=tests/test_large_tensors.py \ | |
| --cov=. --cov-report=xml --cov-append --durations=20 -vv -s | |
| - name: Upload Coverage to Codecov | |
| uses: codecov/codecov-action@v3 |