Skip to content

fix ut

fix ut #1

Workflow file for this run

name: Documentation and Code Coverage
on:
push:
pull_request:
types:
- closed
branches:
- main
jobs:
run:
name: nightly-ci ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install pytorch
run: python -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
- name: Install transformers
run: |
git clone https://github.com/huggingface/transformers.git
cd transformers
pip install -e .
cd ..
- name: Install requirements
run: python -m pip install -r requirements.txt
- name: Install requirements dev
run: python -m pip install -r requirements-dev.txt
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: pip freeze
run: python -m pip freeze
- name: Generate coverage report
run: |
pip install pytest
export PYTHONPATH=.
UNITTEST_GOING=1 pytest --durations=10 _unittests
export PYTHONPATH=