diff --git a/Dockerfile b/Dockerfile index 6f3e7e2..f990969 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM pytorch/pytorch:1.4-cuda10.1-cudnn7-runtime +FROM pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime # Modified from https://github.com/tiangolo/uwsgi-nginx-flask-docker (Apache license) LABEL maintainer="Ko Sugawara " diff --git a/Makefile b/Makefile index ba0b7a1..942d37d 100755 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ help: ELEPHANT_GPU?=0 ELEPHANT_WORKSPACE?=${PWD}/workspace -ELEPHANT_IMAGE_NAME?=elephant-server:0.3.2 +ELEPHANT_IMAGE_NAME?=elephant-server:0.3.3 ELEPHANT_NVIDIA_GID?=$$(ls -n /dev/nvidia$(ELEPHANT_GPU) | awk '{print $$4}') ELEPHANT_DOCKER?=docker diff --git a/elephant-core/elephant/tests/test_models.py b/elephant-core/elephant/tests/test_models.py index 6e20d87..1d180f9 100644 --- a/elephant-core/elephant/tests/test_models.py +++ b/elephant-core/elephant/tests/test_models.py @@ -171,7 +171,7 @@ def test_three_class_segmentation(): [-0.83362025, -1.6382282, -2.5767176, -0.9678207, -1.7188845], [-0.91411495, -1.222617, -2.769664, -4.5017776, -0.85926974]] ]]]) - torch.allclose(y, expected) + assert torch.allclose(y, expected, rtol=1e-4) def test_three_dimensional_flow(): @@ -337,4 +337,4 @@ def test_three_dimensional_flow(): [-0.44132188, -0.87742317, -0.79334104, -0.7186437, -0.64516896], [-0.42390147, -0.54549336, -0.7307426, -0.66375196, -0.2771961]] ]]]) - torch.allclose(y, expected) + assert torch.allclose(y, expected, rtol=1e-4) diff --git a/elephant-core/elephant/util/tests/test_gaussian_smoothing.py b/elephant-core/elephant/util/tests/test_gaussian_smoothing.py index 4aba47d..22da7db 100644 --- a/elephant-core/elephant/util/tests/test_gaussian_smoothing.py +++ b/elephant-core/elephant/util/tests/test_gaussian_smoothing.py @@ -38,7 +38,7 @@ def test_gaussian_smoothing_1d(): expected = np.array( [0.68083227, 1., 1., 1., 0.68083227]).astype(np.float32) print(test) - assert_allclose(test, expected) + assert_allclose(test, expected, rtol=1e-05, atol=1e-08) def test_gaussian_smoothing_2d(): @@ -52,7 +52,7 @@ def test_gaussian_smoothing_2d(): [0.6808322, 1., 1., 1., 0.6808322], [0.4635325, 0.6808322, 0.6808322, 0.6808322, 0.4635325], ]).astype(np.float32) - assert_allclose(test, expected) + assert_allclose(test, expected, rtol=1e-05, atol=1e-08) def test_gaussian_smoothing_3d(): @@ -98,4 +98,4 @@ def test_gaussian_smoothing_3d(): ] ).astype(np.float32) print(test) - assert_allclose(test, expected, rtol=1e-6) + assert_allclose(test, expected, rtol=1e-05, atol=1e-08) diff --git a/elephant-core/elephant/util/tests/test_scaled_moments.py b/elephant-core/elephant/util/tests/test_scaled_moments.py index dc9eb17..432db62 100644 --- a/elephant-core/elephant/util/tests/test_scaled_moments.py +++ b/elephant-core/elephant/util/tests/test_scaled_moments.py @@ -37,4 +37,4 @@ def test_scaled_moments_central(): expected = np.array([[16., 0., 20.], [0., 0., 0.], [80., 0., 100.]]) - assert_allclose(mu, expected) + assert_allclose(mu, expected, rtol=1e-05, atol=1e-08) diff --git a/elephant-core/elephant/version.py b/elephant-core/elephant/version.py index ffd7736..6a5ec8f 100644 --- a/elephant-core/elephant/version.py +++ b/elephant-core/elephant/version.py @@ -24,4 +24,4 @@ # ============================================================================== """Version definition.""" -__version__ = '0.3.2' +__version__ = '0.3.3' diff --git a/elephant.def b/elephant.def index 511c769..7f6d10e 100644 --- a/elephant.def +++ b/elephant.def @@ -1,5 +1,5 @@ Bootstrap: docker -From: pytorch/pytorch:1.4-cuda10.1-cudnn7-runtime +From: pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime %files ./docker /docker diff --git a/elephant_server.ipynb b/elephant_server.ipynb index e8e427f..92ef908 100644 --- a/elephant_server.ipynb +++ b/elephant_server.ipynb @@ -51,7 +51,7 @@ "id": "CpJPKG_ATv39" }, "source": [ - "%env ELEPHANT_SERVER_VERSION = v0.3.2" + "%env ELEPHANT_SERVER_VERSION = v0.3.3" ], "execution_count": null, "outputs": [] diff --git a/environment.yml b/environment.yml index 2708bef..1fe26f7 100644 --- a/environment.yml +++ b/environment.yml @@ -1,7 +1,8 @@ name: base channels: - - pytorch - conda-forge + - pytorch + - nvidia - main - defaults dependencies: @@ -9,174 +10,194 @@ dependencies: - _openmp_mutex=4.5=1_gnu - abseil-cpp=20200923.3=h2531618_0 - absl-py=0.13.0=py37h06a4308_0 - - aiohttp=3.7.4=py37h27cfd23_1 + - aiohttp=3.8.1=py37h7f8727e_0 + - aiosignal=1.2.0=pyhd3eb1b0_0 - asciitree=0.3.3=py_2 - - asn1crypto=1.2.0=py37_0 - astor=0.8.1=py37h06a4308_0 - astunparse=1.6.3=py_0 - - async-timeout=3.0.1=py37h06a4308_0 + - async-timeout=4.0.1=pyhd3eb1b0_0 + - asynctest=0.13.0=py_0 - attrs=21.2.0=pyhd3eb1b0_0 - - backcall=0.1.0=py37_0 - - beautifulsoup4=4.8.2=py37_0 + - backcall=0.2.0=pyhd3eb1b0_0 + - beautifulsoup4=4.10.0=pyh06a4308_0 - blas=1.0=mkl - blinker=1.4=py37h06a4308_0 - blosc=1.21.0=h8c45485_0 - brotli=1.0.9=he6710b0_2 + - brotlipy=0.7.0=py37h27cfd23_1003 - brunsli=0.1=h2531618_0 - bzip2=1.0.8=h7b6447c_0 - c-ares=1.17.1=h27cfd23_0 - - ca-certificates=2021.7.5=h06a4308_1 + - ca-certificates=2021.10.26=h06a4308_2 - cachetools=4.2.2=pyhd3eb1b0_0 - - certifi=2021.5.30=py37h06a4308_0 - - cffi=1.13.0=py37h2e261b9_0 - - chardet=3.0.4=py37_1003 + - certifi=2021.10.8=py37h06a4308_0 + - cffi=1.14.6=py37h400218f_0 + - cfitsio=3.470=hf0d0db6_6 + - chardet=4.0.0=py37h06a4308_1003 - charls=2.2.0=h2531618_0 - - click=8.0.1=pyhd3eb1b0_0 - - cloudpickle=1.6.0=py_0 + - charset-normalizer=2.0.4=pyhd3eb1b0_0 + - click=8.0.3=pyhd3eb1b0_0 + - cloudpickle=2.0.0=pyhd3eb1b0_0 - conda=4.10.3=py37h06a4308_0 - - conda-build=3.18.11=py37_0 - - conda-package-handling=1.6.0=py37h7b6447c_0 + - conda-build=3.21.5=py37h06a4308_0 + - conda-package-handling=1.7.3=py37h27cfd23_1 - coverage=5.5=py37h27cfd23_2 - - cryptography=2.8=py37h1ba5d50_0 - - cudatoolkit=10.1.243=h6bb024c_0 - - cycler=0.10.0=py37_0 - - cython=0.29.24=py37h295c915_0 + - cryptography=3.4.8=py37hd23ed53_0 + - cudatoolkit=11.3.1=ha36c431_9 + - cycler=0.11.0=pyhd3eb1b0_0 + - cython=0.29.24=py37hdbfa776_0 - cytoolz=0.11.0=py37h7b6447c_0 - - dask-core=2021.8.1=pyhd3eb1b0_0 - - decorator=4.4.1=py_0 + - dask-core=2021.10.0=pyhd3eb1b0_0 + - dataclasses=0.8=pyh6d0b6a4_7 + - decorator=5.1.0=pyhd3eb1b0_0 - fasteners=0.16.3=pyhd3eb1b0_0 - - filelock=3.0.12=py_0 + - ffmpeg=4.3=hf484d3e_0 + - filelock=3.0.12=pyhd3eb1b0_1 - flask=1.1.2=pyhd3eb1b0_0 - flask-redis=0.4.0=py_0 - - freetype=2.9.1=h8a8886c_1 - - fsspec=2021.7.0=pyhd3eb1b0_0 + - fonttools=4.25.0=pyhd3eb1b0_0 + - freetype=2.10.4=h5ab3b9f_0 + - frozenlist=1.2.0=py37h7f8727e_0 + - fsspec=2021.10.1=pyhd3eb1b0_0 - gast=0.3.3=py_0 - giflib=5.2.1=h7b6447c_0 - - glob2=0.7=py_0 - - google-auth=1.28.0=pyhd3eb1b0_0 - - google-auth-oauthlib=0.4.2=pyhd3eb1b0_2 - - google-pasta=0.2.0=py_0 + - glob2=0.7=pyhd3eb1b0_0 + - gmp=6.2.1=h2531618_2 + - gnutls=3.6.15=he1e5248_0 + - google-auth=1.33.0=pyhd3eb1b0_0 + - google-auth-oauthlib=0.4.4=pyhd3eb1b0_0 + - google-pasta=0.2.0=pyhd3eb1b0_0 - grpc-cpp=1.36.4=h7919d58_0 - grpcio=1.36.1=py37h2157cd5_1 - h5py=2.10.0=py37hd6299e0_1 - hdf5=1.10.6=hb1b8bf9_0 - - icu=58.2=he6710b0_3 - - idna=2.8=py37_0 - - imagecodecs=2021.3.31=py37haf4b6ec_0 + - icu=67.1=he1b5a44_0 + - idna=2.10=pyhd3eb1b0_0 + - imagecodecs=2021.8.26=py37h4cda21f_0 - imageio=2.9.0=pyhd3eb1b0_0 - - importlib-metadata=3.10.0=py37h06a4308_0 - - intel-openmp=2019.4=243 - - ipython=7.11.1=py37h39e3cac_0 - - ipython_genutils=0.2.0=py37_0 + - importlib-metadata=4.8.1=py37h06a4308_0 + - intel-openmp=2021.3.0=h06a4308_3350 + - ipython=7.27.0=py37hb070fc8_0 - itsdangerous=2.0.1=pyhd3eb1b0_0 - jansson=2.13.1=h7f98852_0 - - jedi=0.15.2=py37_0 - - jinja2=2.10.3=py_0 - - joblib=1.0.1=pyhd3eb1b0_0 - - jpeg=9d=h36c2ea0_0 + - jedi=0.18.0=py37h06a4308_1 + - jinja2=2.11.3=pyhd3eb1b0_0 + - joblib=1.1.0=pyhd3eb1b0_0 + - jpeg=9d=h7f8727e_0 - jxrlib=1.1=h7b6447c_2 - keras-preprocessing=1.1.2=pyhd3eb1b0_0 - kiwisolver=1.3.1=py37h2531618_0 - - krb5=1.17.1=h173b8e3_0 + - krb5=1.19.2=hac12032_0 + - lame=3.100=h7b6447c_0 - lcms2=2.12=h3be6417_0 - - lerc=2.2.1=h2531618_0 + - ld_impl_linux-64=2.35.1=h7274673_9 + - lerc=3.0=h295c915_0 - libaec=1.0.4=he6710b0_1 - libarchive=3.4.2=h62408e4_0 - - libblas=3.8.0=14_mkl - - libcblas=3.8.0=14_mkl - - libcurl=7.76.1=hc4aaa36_1 - - libdeflate=1.7=h27cfd23_5 - - libedit=3.1.20181209=hc058e9b_0 - - libev=4.33=h7b6447c_0 - - libffi=3.2.1=hd88cf55_4 + - libblas=3.9.0=11_linux64_mkl + - libcblas=3.9.0=11_linux64_mkl + - libcurl=7.78.0=h0b77cf5_0 + - libdeflate=1.8=h7f8727e_5 + - libedit=3.1.20210714=h7f8727e_0 + - libev=4.33=h7f8727e_1 + - libffi=3.3=he6710b0_2 - libgcc-ng=9.3.0=h5101ec6_17 - - libgfortran-ng=7.3.0=hdf63c60_0 + - libgfortran-ng=7.5.0=ha8ba4b0_17 + - libgfortran4=7.5.0=ha8ba4b0_17 - libgomp=9.3.0=h5101ec6_17 - libiconv=1.15=h63c8f33_5 - - liblapack=3.8.0=14_mkl - - liblief=0.9.0=h7725739_2 - - libnghttp2=1.43.0=h812cca2_0 + - libidn2=2.3.2=h7f8727e_0 + - liblapack=3.9.0=11_linux64_mkl + - liblief=0.10.1=he6710b0_0 + - libnghttp2=1.46.0=hce63b2e_0 - libpng=1.6.37=hbc83047_0 - libprotobuf=3.15.8=h780b84a_0 - libssh2=1.9.0=h1ba5d50_1 - libstdcxx-ng=9.3.0=hd4cf53a_17 + - libtasn1=4.16.0=h27cfd23_0 - libtiff=4.2.0=h85742a9_0 + - libunistring=0.9.10=h27cfd23_0 + - libuv=1.40.0=h7b6447c_0 + - libwebp=1.2.0=h89dd481_0 - libwebp-base=1.2.0=h27cfd23_0 - - libxml2=2.9.9=hea5a465_1 + - libxml2=2.9.10=h72b56ed_2 - libzopfli=1.0.3=he6710b0_0 - locket=0.2.1=py37h06a4308_1 - lz4-c=1.9.3=h295c915_1 - - lzo=2.10=h49e0be7_2 - markdown=3.3.4=py37h06a4308_0 - - markupsafe=1.1.1=py37h7b6447c_0 - - matplotlib-base=3.2.1=py37hef1b27d_0 - - mkl=2019.4=243 - - mkl-service=2.3.0=py37he904b0f_0 - - mkl_fft=1.0.15=py37ha843d7b_0 - - mkl_random=1.1.0=py37hd6b4f25_0 + - markupsafe=2.0.1=py37h27cfd23_0 + - matplotlib-base=3.4.3=py37hbbc1b5f_0 + - matplotlib-inline=0.1.2=pyhd3eb1b0_2 + - mkl=2021.3.0=h06a4308_520 + - mkl-service=2.4.0=py37h7f8727e_0 + - mkl_fft=1.3.1=py37hd3c417c_0 + - mkl_random=1.2.2=py37h51133e4_0 - msgpack-python=1.0.2=py37hff7bd54_1 - multidict=5.1.0=py37h27cfd23_2 - - ncurses=6.1=he6710b0_1 - - networkx=2.6.2=pyhd3eb1b0_0 - - ninja=1.9.0=py37hfd86e86_0 + - munkres=1.1.4=py_0 + - ncurses=6.2=he6710b0_1 + - nettle=3.7.3=hbbd107a_1 + - networkx=2.6.3=pyhd3eb1b0_0 - numcodecs=0.8.0=py37h2531618_0 - - numpy=1.20.3=py37h038b26d_0 - - numpy-base=1.17.4=py37hde5b4d6_0 - - oauthlib=3.1.0=py_0 + - numpy=1.21.2=py37h20f2e39_0 + - numpy-base=1.21.2=py37h79a1101_0 + - oauthlib=3.1.1=pyhd3eb1b0_0 - olefile=0.46=py37_0 + - openh264=2.1.0=hd408876_0 - openjpeg=2.4.0=h3ad879b_0 - openssl=1.1.1l=h7f8727e_0 - opt_einsum=3.3.0=pyhd3eb1b0_1 - - packaging=21.0=pyhd3eb1b0_0 - - parso=0.5.2=py_0 + - packaging=21.3=pyhd3eb1b0_0 + - parso=0.8.2=pyhd3eb1b0_0 - partd=1.2.0=pyhd3eb1b0_0 - - patchelf=0.10=he6710b0_0 + - patchelf=0.13=h295c915_0 - pcre=8.45=h295c915_0 - - pexpect=4.7.0=py37_0 - - pickleshare=0.7.5=py37_0 + - pexpect=4.8.0=pyhd3eb1b0_3 + - pickleshare=0.7.5=pyhd3eb1b0_1003 - pika=1.1.0=pyh9f0ad1d_1 - - pillow=7.0.0=py37hb39fc2d_0 - - pip=19.3.1=py37_0 - - pkginfo=1.5.0.1=py37_0 - - prompt_toolkit=3.0.2=py_0 + - pillow=8.4.0=py37h5aabda8_0 + - pip=21.0.1=py37h06a4308_0 + - pkginfo=1.7.1=py37h06a4308_0 + - prompt-toolkit=3.0.20=pyhd3eb1b0_0 - protobuf=3.15.8=py37hcd2ae1e_0 - - psutil=5.6.7=py37h7b6447c_0 - - ptyprocess=0.6.0=py37_0 - - py-lief=0.9.0=py37h7725739_2 - - pyasn1=0.4.8=py_0 + - psutil=5.8.0=py37h27cfd23_1 + - ptyprocess=0.7.0=pyhd3eb1b0_2 + - py-lief=0.10.1=py37h403a769_0 + - pyasn1=0.4.8=pyhd3eb1b0_0 - pyasn1-modules=0.2.8=py_0 - - pycosat=0.6.3=py37h14c3975_0 - - pycparser=2.19=py37_0 - - pygments=2.5.2=py_0 - - pyjwt=2.0.1=py37h06a4308_0 - - pyopenssl=19.0.0=py37_0 - - pyparsing=2.4.7=pyhd3eb1b0_0 - - pysocks=1.7.1=py37_0 - - python=3.7.4=h265db76_1 + - pycosat=0.6.3=py37h27cfd23_0 + - pycparser=2.20=py_2 + - pygments=2.10.0=pyhd3eb1b0_0 + - pyjwt=2.1.0=py37h06a4308_0 + - pyopenssl=20.0.1=pyhd3eb1b0_1 + - pyparsing=3.0.4=pyhd3eb1b0_0 + - pysocks=1.7.1=py37_1 + - python=3.7.11=h12debd9_0 - python-dateutil=2.8.2=pyhd3eb1b0_0 - python-flatbuffers=1.12=pyhd3eb1b0_0 - - python-libarchive-c=2.8=py37_13 + - python-libarchive-c=2.9=pyhd3eb1b0_1 - python_abi=3.7=2_cp37m - - pytorch=1.4.0=py3.7_cuda10.1.243_cudnn7.6.3_0 - - pytz=2019.3=py_0 + - pytorch=1.10.0=py3.7_cuda11.3_cudnn8.2.0_0 + - pytorch-mutex=1.0=cuda + - pytz=2021.3=pyhd3eb1b0_0 - pywavelets=1.1.1=py37h7b6447c_2 - - pyyaml=5.2=py37h7b6447c_0 + - pyyaml=5.4.1=py37h27cfd23_1 - re2=2020.11.01=h2531618_1 - - readline=7.0=h7b6447c_5 - - redis-py=3.5.3=py_0 - - requests=2.22.0=py37_0 + - readline=8.1=h27cfd23_0 + - redis-py=3.5.3=pyhd3eb1b0_0 + - requests=2.25.1=pyhd3eb1b0_0 - requests-oauthlib=1.3.0=py_0 - - ripgrep=11.0.2=he32d670_0 + - ripgrep=12.1.1=0 - rsa=4.7.2=pyhd3eb1b0_1 - - ruamel_yaml=0.15.46=py37h14c3975_0 + - ruamel_yaml=0.15.100=py37h27cfd23_0 - scikit-image=0.17.2=py37hdf5156a_0 - - scikit-learn=0.23.1=py37h423224d_0 - - scipy=1.4.1=py37h0b6359f_0 - - setuptools=41.4.0=py37_0 + - scikit-learn=0.23.1=py37h8a51577_0 + - scipy=1.4.1=py37ha3d9a3c_3 + - setuptools=58.0.4=py37h06a4308_0 - six=1.16.0=pyhd3eb1b0_0 - snappy=1.1.8=he6710b0_0 - - soupsieve=1.9.5=py37_0 - - sqlite=3.30.0=h7b6447c_0 + - soupsieve=2.2.1=pyhd3eb1b0_0 + - sqlite=3.36.0=hc218d9a_0 - tensorboard=2.4.0=pyhc547734_0 - tensorboard-plugin-wit=1.6.0=py_0 - tensorboardx=2.1=py_0 @@ -184,30 +205,35 @@ dependencies: - tensorflow-base=2.4.0=py37h00a14e9_0 - tensorflow-estimator=2.4.0=pyh9656e83_0 - termcolor=1.1.0=py37h06a4308_1 - - threadpoolctl=2.2.0=pyhbf3da8f_0 - - tifffile=2021.4.8=pyhd3eb1b0_2 - - tk=8.6.8=hbc83047_0 - - toolz=0.11.1=pyhd3eb1b0_0 - - torchvision=0.5.0=py37_cu101 + - threadpoolctl=2.2.0=pyh0d69192_0 + - tifffile=2021.7.2=pyhd3eb1b0_2 + - tk=8.6.10=hbc83047_0 + - toolz=0.11.2=pyhd3eb1b0_0 + - torchtext=0.11.0=py37 + - torchvision=0.11.0=py37_cu113 - tornado=6.1=py37h27cfd23_0 - tqdm=4.48.2=py_0 - - traitlets=4.3.3=py37_0 - - typing-extensions=3.10.0.0=hd3eb1b0_0 - - typing_extensions=3.10.0.0=pyh06a4308_0 - - urllib3=1.24.2=py37_0 - - uwsgi=2.0.18=py37hd004684_2 - - wcwidth=0.1.7=py37_0 - - werkzeug=1.0.1=pyhd3eb1b0_0 - - wheel=0.37.0=pyhd3eb1b0_0 - - wrapt=1.12.1=py37h7b6447c_1 + - traitlets=5.1.0=pyhd3eb1b0_0 + - typing-extensions=3.10.0.2=hd3eb1b0_0 + - typing_extensions=3.10.0.2=pyh06a4308_0 + - tzdata=2021a=h52ac0ba_0 + - urllib3=1.26.6=pyhd3eb1b0_1 + - uwsgi=2.0.18=py37h427a7ac_4 + - wcwidth=0.2.5=pyhd3eb1b0_0 + - werkzeug=2.0.2=pyhd3eb1b0_0 + - wheel=0.36.2=pyhd3eb1b0_0 + - wrapt=1.13.3=py37h7f8727e_2 - xz=5.2.5=h7b6447c_0 - - yaml=0.1.7=had09818_2 + - yaml=0.2.5=h7b6447c_0 - yarl=1.6.3=py37h27cfd23_0 - zarr=2.4.0=py_0 - zfp=0.5.5=h2531618_6 - - zipp=3.5.0=pyhd3eb1b0_0 + - zipp=3.6.0=pyhd3eb1b0_0 - zlib=1.2.11=h7b6447c_3 - zstd=1.4.9=haebb681_0 - pip: + - dnspython==2.1.0 + - python-etcd==0.4.5 + - torchelastic==0.2.0 - ./elephant-core - nvsmi==0.4.2