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 pydantic version to fix mlflow unit tests #1351

Merged
merged 8 commits into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
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
4 changes: 2 additions & 2 deletions .github/workflows/merge_stage_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ jobs:
pip install openmim
mim install mmcv
- name: Run CPU unittests
run: pytest tests/ --ignore tests/test_dist
run: python -m pytest tests/ --ignore tests/test_dist
zhouzaida marked this conversation as resolved.
Show resolved Hide resolved
if: ${{ matrix.platform == 'cpu' }}
- name: Run GPU unittests
# Skip testing distributed related unit tests since the memory of windows CI is limited
run: pytest tests/ --ignore tests/test_dist --ignore tests/test_optim/test_optimizer/test_optimizer_wrapper.py --ignore tests/test_model/test_wrappers/test_model_wrapper.py
run: python -m pytest tests/ --ignore tests/test_dist --ignore tests/test_optim/test_optimizer/test_optimizer_wrapper.py --ignore tests/test_model/test_wrappers/test_model_wrapper.py
zhouzaida marked this conversation as resolved.
Show resolved Hide resolved
if: ${{ matrix.platform == 'cu111' }}
230 changes: 115 additions & 115 deletions .github/workflows/pr_stage_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,118 +19,118 @@ concurrency:
cancel-in-progress: true

jobs:
build_cpu:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.7]
include:
- torch: 1.8.1
torchvision: 0.9.1
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python -m pip install pip --upgrade
- name: Upgrade wheel
run: python -m pip install wheel --upgrade
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
- name: Build MMEngine from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: |
pip install -r requirements/tests.txt
pip install openmim
mim install mmcv
- name: Run unittests and generate coverage report
run: |
coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist
coverage xml
coverage report -m
# Upload coverage report for python3.7 && pytorch1.8.1 cpu
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false
# build_cpu:
# runs-on: ubuntu-22.04
# strategy:
# matrix:
# python-version: [3.7]
# include:
# - torch: 1.8.1
# torchvision: 0.9.1
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# - name: Upgrade pip
# run: python -m pip install pip --upgrade
# - name: Upgrade wheel
# run: python -m pip install wheel --upgrade
# - name: Install PyTorch
# run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
# - name: Build MMEngine from source
# run: pip install -e . -v
# - name: Install unit tests dependencies
# run: |
# pip install -r requirements/tests.txt
# pip install openmim
# mim install mmcv
# - name: Run unittests and generate coverage report
# run: |
# coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist
# coverage xml
# coverage report -m
# # Upload coverage report for python3.7 && pytorch1.8.1 cpu
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# file: ./coverage.xml
# flags: unittests
# env_vars: OS,PYTHON
# name: codecov-umbrella
# fail_ci_if_error: false

build_cu102:
runs-on: ubuntu-22.04
container:
image: pytorch/pytorch:1.8.1-cuda10.2-cudnn7-devel
env:
MKL_THREADING_LAYER: GNU
strategy:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: pip install pip --upgrade
- name: Fetch GPG keys
run: |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
- name: Install system dependencies
run: apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6
- name: Build MMEngine from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: |
pip install -r requirements/tests.txt
pip install openmim
mim install mmcv
- name: Run unittests and generate coverage report
run: |
coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist
coverage xml
coverage report -m
# build_cu102:
# runs-on: ubuntu-22.04
# container:
# image: pytorch/pytorch:1.8.1-cuda10.2-cudnn7-devel
# env:
# MKL_THREADING_LAYER: GNU
# strategy:
# matrix:
# python-version: [3.7]
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# - name: Upgrade pip
# run: pip install pip --upgrade
# - name: Fetch GPG keys
# run: |
# apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
# apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
# - name: Install system dependencies
# run: apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6
# - name: Build MMEngine from source
# run: pip install -e . -v
# - name: Install unit tests dependencies
# run: |
# pip install -r requirements/tests.txt
# pip install openmim
# mim install mmcv
# - name: Run unittests and generate coverage report
# run: |
# coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist
# coverage xml
# coverage report -m

build_cu117:
runs-on: ubuntu-22.04
container:
image: pytorch/pytorch:2.0.0-cuda11.7-cudnn8-devel
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: pip install pip --upgrade
- name: Fetch GPG keys
run: |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
- name: Install system dependencies
run: apt-get update && apt-get install -y git ffmpeg libturbojpeg
- name: Build MMEngine from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: |
pip install -r requirements/tests.txt
pip install openmim
mim install mmcv
# Distributed related unit test may randomly error in PyTorch 1.13.0
- name: Run unittests and generate coverage report
run: |
coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist/
coverage xml
coverage report -m
# build_cu117:
# runs-on: ubuntu-22.04
# container:
# image: pytorch/pytorch:2.0.0-cuda11.7-cudnn8-devel
# strategy:
# matrix:
# python-version: [3.9]
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# - name: Upgrade pip
# run: pip install pip --upgrade
# - name: Fetch GPG keys
# run: |
# apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
# apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
# - name: Install system dependencies
# run: apt-get update && apt-get install -y git ffmpeg libturbojpeg
# - name: Build MMEngine from source
# run: pip install -e . -v
# - name: Install unit tests dependencies
# run: |
# pip install -r requirements/tests.txt
# pip install openmim
# mim install mmcv
# # Distributed related unit test may randomly error in PyTorch 1.13.0
# - name: Run unittests and generate coverage report
# run: |
# coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist/
# coverage xml
# coverage report -m

build_windows:
runs-on: windows-2022
Expand Down Expand Up @@ -160,13 +160,13 @@ jobs:
run: pip install -e . -v
- name: Install unit tests dependencies
run: |
pip install -r requirements/tests.txt
pip install openmim
mim install mmcv
python -m pip install -r requirements/tests.txt
python -m pip install openmim
python -m mim install mmcv
- name: Run CPU unittests
run: pytest tests/ --ignore tests/test_dist
run: python -m pytest tests/ --ignore tests/test_dist
if: ${{ matrix.platform == 'cpu' }}
- name: Run GPU unittests
# Skip testing distributed related unit tests since the memory of windows CI is limited
run: pytest tests/ --ignore tests/test_dist --ignore tests/test_optim/test_optimizer/test_optimizer_wrapper.py --ignore tests/test_model/test_wrappers/test_model_wrapper.py --ignore tests/test_hooks/test_sync_buffers_hook.py
run: python -m pytest tests/ --ignore tests/test_dist --ignore tests/test_optim/test_optimizer/test_optimizer_wrapper.py --ignore tests/test_model/test_wrappers/test_model_wrapper.py --ignore tests/test_hooks/test_sync_buffers_hook.py
if: ${{ matrix.platform == 'cu111' }}
3 changes: 2 additions & 1 deletion requirements/tests.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
aim
aim;sys_platform!='win32'
bitsandbytes
clearml
coverage
Expand All @@ -9,4 +9,5 @@ lmdb
mlflow
neptune
parameterized
pydantic==1.10.9
pytest
Loading