Skip to content

Commit

Permalink
🐛👷 add pytest-cov, try deactivating MPS
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry committed Aug 16, 2023
1 parent 5ab9f2b commit 650b37c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install pytest
run: python -m pip install pytest
run: python -m pip install pytest pytest-cov

- name: Run pytest
run: pytest .
5 changes: 5 additions & 0 deletions project/01_1_train_CF.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,11 @@
" model_dir=args.out_models)\n",
"if args.cuda:\n",
" ana_collab.learn.model = ana_collab.learn.model.cuda()\n",
"else:\n",
" # try to set explicitly cpu in case not cuda\n",
" # MPS logic might not work properly in fastai yet https://github.com/fastai/fastai/pull/3858\n",
" ana_collab.learn.model = ana_collab.learn.model.cpu()\n",
"\n",
"# learn.summary() # see comment at DAE"
]
},
Expand Down
7 changes: 6 additions & 1 deletion project/01_1_train_CF.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.14.5
# jupytext_version: 1.15.0
# kernelspec:
# display_name: Python 3
# language: python
Expand Down Expand Up @@ -209,6 +209,11 @@
model_dir=args.out_models)
if args.cuda:
ana_collab.learn.model = ana_collab.learn.model.cuda()
else:
# try to set explicitly cpu in case not cuda
# MPS logic might not work properly in fastai yet https://github.com/fastai/fastai/pull/3858
ana_collab.learn.model = ana_collab.learn.model.cpu()

# learn.summary() # see comment at DAE

# %% [markdown]
Expand Down

0 comments on commit 650b37c

Please sign in to comment.