Skip to content
Snippets Groups Projects
Commit 029bb41b authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

[bob-devel] More tests for pytorch

parent 0c1c1c67
No related branches found
No related tags found
1 merge request!428[bob-devel] More tests for pytorch
Pipeline #32750 failed
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% set nopin = ['ca-certificates', 'certifi', 'openssl', 'libstdcxx-ng', 'libgcc-ng', 'libcxx', 'libcxxabi'] %} {% set nopin = ['ca-certificates', 'certifi', 'openssl', 'libstdcxx-ng', 'libgcc-ng', 'libcxx', 'libcxxabi'] %}
package: package:
name: beat-devel name: beat-devel
version: 2019.08.14 version: 2019.08.26
build: build:
# the build number must be zero all the time. # the build number must be zero all the time.
...@@ -15,7 +15,7 @@ build: ...@@ -15,7 +15,7 @@ build:
requirements: requirements:
host: host:
- python {{ python }} - python {{ python }}
- bob-devel 2019.08.14 - bob-devel 2019.08.26
- docker-py 4.0.2 - docker-py 4.0.2
- flask 1.0.2 - flask 1.0.2
- flask-cors 3.0.7 - flask-cors 3.0.7
......
...@@ -4,7 +4,7 @@ package: ...@@ -4,7 +4,7 @@ package:
name: bob-devel name: bob-devel
# please update the version of beat-devel and update bob-devel's version # please update the version of beat-devel and update bob-devel's version
# there as well in the same merge request. # there as well in the same merge request.
version: 2019.08.14 version: 2019.08.26
build: build:
# the build number must be zero all the time. # the build number must be zero all the time.
...@@ -94,11 +94,11 @@ requirements: ...@@ -94,11 +94,11 @@ requirements:
{% endfor %} {% endfor %}
test: test:
imports:
- torch # [linux]
requires: requires:
- numpy
- ffmpeg - ffmpeg
- pytorch # [linux] - pytorch # [linux]
- torchvision # [linux]
commands: commands:
# we expect these features from ffmpeg: # we expect these features from ffmpeg:
- ffmpeg -codecs | grep "DEVI.S zlib" # [unix] - ffmpeg -codecs | grep "DEVI.S zlib" # [unix]
......
import sys
# couple of imports to see if packages are working
import numpy
def test_pytorch():
import torch
from torchvision.models import DenseNet
model = DenseNet()
t = torch.randn(1, 3, 224, 224)
out = model(t)
assert out.shape[1] == 1000
if sys.platform.startswith("linux"):
# test if pytorch installation is sane
test_pytorch()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment