🔥 Change tests optimizer, workflow dependencies #74
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: autobuild_segm | |
on: | |
pull_request: | |
branches: | |
- master | |
- dev | |
push: | |
branches: | |
- master | |
- 'V**' | |
- dev | |
env: | |
GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS_DATA }} | |
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
architecture: 'x64' | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- uses: iterative/setup-cml@v1 | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu | |
pip install -e '.[dev,cv,cv_semantic]' | |
pip install dvc dvc-gdrive | |
npm install -g markdown-table-cli | |
- name: Download data | |
run: | | |
echo "$GDRIVE_CREDENTIALS_DATA" > credentials.json | |
dvc remote modify gdrive --local gdrive_user_credentials_file ./credentials.json | |
dvc pull | |
ls -la samples | |
- name: Test with pytest | |
run: | | |
pytest tests/semantic --capture=no | |
- name: Display report | |
run: | | |
echo "# Semantic Report" > report.md | |
echo "#### Metrics" >> report.md | |
cat runs/pytest_segm/Validation/metrics.json | md-table >> report.md | |
echo >> report.md | |
echo "#### Prediction" >> report.md | |
echo "![Prediction](runs/pytest_segm/Validation/prediction.png)" >> report.md | |
cml comment create report.md |