From 9e32d8271cead92e18126309e5ac007bd54e418f Mon Sep 17 00:00:00 2001 From: Matthw Honnibal Date: Wed, 23 Oct 2019 05:13:28 +0200 Subject: [PATCH] Avoid failing if cupy random can'tbe set --- spacy/util.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spacy/util.py b/spacy/util.py index 0d07a532d..b4c4d3fab 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -719,7 +719,10 @@ def fix_random_seed(seed=0): random.seed(seed) numpy.random.seed(seed) if cupy is not None: - cupy.random.seed(seed) + try: + cupy.random.seed(seed) + except: + pass def get_json_validator(schema):