Skip to content

Commit

Permalink
Merge pull request #53 from ShopRunner/remove_deprecated_test
Browse files Browse the repository at this point in the history
Fix deprecated PyTorch Lightning test
  • Loading branch information
nathancooperjones committed Jul 13, 2022
2 parents bc8979c + 26cdf83 commit 0b8b78d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 20 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project uses [Semantic Versioning](http://semver.org/).

# [1.2.1] - 2022-7-12
### Fixed
- Deprecated PyTorch Lightning unit test

# [1.2.0] - 2022-1-18
### Added
- option to ``force_split`` to ``stratified_split``
Expand Down
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
FROM pytorch/pytorch:1.10.0-cuda11.3-cudnn8-devel
MAINTAINER data-science@shoprunner.com
LABEL maintainer="data-science@shoprunner.com"

# Nvidia fix based on Nate's recommendation
RUN apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/3bf863cc.pub

RUN apt-get update \
&& apt-get install -y tmux \
&& apt-get install -y vim \
&& apt-get install -y libpq-dev \
&& apt-get install -y gcc \
&& apt-get clean
&& apt-get install -y tmux \
&& apt-get install -y vim \
&& apt-get install -y libpq-dev \
&& apt-get install -y gcc \
&& apt-get clean

# first remove PyYAML from conda or else pip gives us an error that a distutils library cannot be
# uninstalled
Expand Down
2 changes: 1 addition & 1 deletion collie/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.2.0'
__version__ = '1.2.1'
13 changes: 0 additions & 13 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,6 @@ def test_CollieTrainer_no_gpu(is_available_mock, untrained_implicit_model, capfd
assert 'Detected GPU. Setting ``gpus`` to 1.' in out


@mock.patch('torch.cuda.is_available')
def test_CollieTrainer_on_cpu(is_available_mock, untrained_implicit_model):
is_available_mock.return_value = True

with pytest.warns(UserWarning):
trainer = CollieTrainer(model=untrained_implicit_model,
logger=False,
enable_checkpointing=False,
gpus=0)

assert trainer.gpus == 0


def test_basepipeline_does_not_initialize(train_val_implicit_data):
train, val = train_val_implicit_data

Expand Down

0 comments on commit 0b8b78d

Please sign in to comment.