Added provision for resuming training from a checkpoint in case the training is interrupted #5972
This file contains 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 Tests | |
on: | |
push: | |
paths-ignore: | |
- 'docs/**' | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.7", "3.10"] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Hack to get setup-python to work on nektos/act | |
run: | | |
if [ ! -f "/etc/lsb-release" ] ; then | |
echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release | |
fi | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: cache_v2_${{ env.pythonLocation }}-${{ hashFiles('requirements/**') }} | |
- name: Install Dependencies and lightly | |
run: pip install -e '.[all]' | |
- name: Run Pytest | |
run: | | |
export LIGHTLY_SERVER_LOCATION="localhost:-1" | |
pip install pytest-cov | |
python -m pytest -s -v --runslow --cov=./lightly --cov-report=xml --ignore=./lightly/openapi_generated/ | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: true | |
files: ./coverage.xml | |
token: ${{ secrets.CODECOV_TOKEN }} |