Replace deprecated conda develop
#26
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: model-testing | |
on: [push] | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
auto-update-conda: true | |
python-version: '3.7' | |
activate-environment: core-analysis | |
use-only-tar-bz2: true | |
use-mamba: true | |
- name: Set cache date | |
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV | |
- uses: actions/cache@v2 | |
env: | |
CACHE_NUMBER: 0 | |
with: | |
path: ~/conda_pkgs | |
key: | |
conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }} | |
- name: Update environment | |
run: mamba update -n core-analysis -f environment.yml | |
if: steps.cache.outputs.cache-hit != 'true' | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- uses: iterative/setup-cml@v1 | |
- name: Train model | |
env: | |
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CML: https://github.com/iterative/cml/releases/latest/download/cml-linux-x64 | |
run: | | |
# dvc remote add data gdrive://1SSuE4GVQ5xjePujH0AGdXBVWXauanteG | |
# dvc remote add images gdrive://1iYyv9QR9NK7XXVaN4IzFAtQPgDWdYYlY | |
# dvc pull data | |
# dvc pull images | |
pip install --no-build-isolation --no-deps -e . | |
python core_analysis --train --test --do-augment | |
cat metrics.txt >> report.md | |
echo "![](./plot.png)" >> report.md | |
cml comment create report.md |