Skip to content

Commit

Permalink
[Fix] fix version check (#2544)
Browse files Browse the repository at this point in the history
  • Loading branch information
VoVAllen committed Jan 19, 2021
1 parent 9a9a06e commit 917a755
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/source/install/backend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PyTorch backend
---------------

Export ``DGLBACKEND`` as ``pytorch`` to specify PyTorch backend. The required PyTorch
version is 1.1.0 or later. See `pytorch.org <https://pytorch.org>`_ for installation instructions.
version is 1.5.0 or later. See `pytorch.org <https://pytorch.org>`_ for installation instructions.

MXNet backend
-------------
Expand All @@ -44,5 +44,5 @@ instructions. In addition, DGL will set ``TF_FORCE_GPU_ALLOW_GROWTH`` to ``true`

.. code:: bash
pip install "tensorflow>=2.2.0rc1" # when using tensorflow cpu version
pip install "tensorflow>=2.2.0" # when using tensorflow cpu version
4 changes: 2 additions & 2 deletions python/dgl/backend/pytorch/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
from ...base import dgl_warning

if LooseVersion(th.__version__) < LooseVersion("1.5.0"):
dgl_warning("Detected an old version of PyTorch. Suggest using torch>=1.5.0 "
"for the best experience.")
raise Exception("Detected an old version of PyTorch. Please update torch>=1.5.0 "
"for the best experience.")

def data_type_dict():
return {'float16' : th.float16,
Expand Down

0 comments on commit 917a755

Please sign in to comment.