Skip to content

fix: Accumulate loss value for metrics while gradient accumulation #216

fix: Accumulate loss value for metrics while gradient accumulation

fix: Accumulate loss value for metrics while gradient accumulation #216

Workflow file for this run

name: Test
on:
push:
pull_request:
types: [opened, synchronize]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
- name: Install CPU PyTorch
if: ${{ matrix.os != 'macos-latest' }}
run: pip3 install torch==2.0.1 --index-url https://download.pytorch.org/whl/cpu
- name: Install PyTorch on macOS
if: ${{ matrix.os == 'macos-latest' }}
run: pip3 install torch==2.0.1
- name: Check code style
run: flake8
- name: Test
run: pytest
- name: Upload coverage
uses: codecov/codecov-action@v1