mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-14 21:57:15 +03:00
Avoid failing if cupy random can'tbe set
This commit is contained in:
parent
f8bf5b7fe5
commit
9e32d8271c
|
@ -719,7 +719,10 @@ def fix_random_seed(seed=0):
|
||||||
random.seed(seed)
|
random.seed(seed)
|
||||||
numpy.random.seed(seed)
|
numpy.random.seed(seed)
|
||||||
if cupy is not None:
|
if cupy is not None:
|
||||||
cupy.random.seed(seed)
|
try:
|
||||||
|
cupy.random.seed(seed)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def get_json_validator(schema):
|
def get_json_validator(schema):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user