Skip to content

fix multiple tests. with latest monarch and rdma, ts.put and ts.get only works inside an actor #198

fix multiple tests. with latest monarch and rdma, ts.put and ts.get only works inside an actor

fix multiple tests. with latest monarch and rdma, ts.put and ts.get only works inside an actor #198

Workflow file for this run

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 slice tests (test_slice.py) with coverage
run: |
TORCHSTORE_RDMA_ENABLED=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 \
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.
run: |
TORCHSTORE_RDMA_ENABLED=0 \
pytest tests/ \
--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