From c968d1560fbac87a94ca91865418766d9f663abd Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Fri, 16 Oct 2020 11:33:20 +0200 Subject: [PATCH] Fix docs example [ci skip] --- website/docs/usage/embeddings-transformers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/usage/embeddings-transformers.md b/website/docs/usage/embeddings-transformers.md index b3cff78db..1673eef5e 100644 --- a/website/docs/usage/embeddings-transformers.md +++ b/website/docs/usage/embeddings-transformers.md @@ -243,12 +243,12 @@ $ python -m spacy download en_core_web_trf ```python ### Example import spacy -from thinc.api import use_pytorch_for_gpu_memory, require_gpu +from thinc.api import set_gpu_allocator, require_gpu # Use the GPU, with memory allocations directed via PyTorch. # This prevents out-of-memory errors that would otherwise occur from competing # memory pools. -use_pytorch_for_gpu_memory() +set_gpu_allocator("pytorch") require_gpu(0) nlp = spacy.load("en_core_web_trf")