From e73595bd649a149879816a59b56f57c8b37c73d0 Mon Sep 17 00:00:00 2001 From: Lysandre Debut Date: Wed, 29 Apr 2020 09:53:19 -0400 Subject: [PATCH] Remove jitted method so that our models are pickable. (#4050) --- src/transformers/activations.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/transformers/activations.py b/src/transformers/activations.py index 2028e9c7d8d..60e8e8d05e3 100644 --- a/src/transformers/activations.py +++ b/src/transformers/activations.py @@ -33,15 +33,6 @@ if torch.__version__ < "1.4.0": gelu = _gelu_python else: gelu = F.gelu - try: - import torch_xla # noqa F401 - - logger.warning( - "The torch_xla package was detected in the python environment. PyTorch/XLA and JIT is untested," - " no activation function will be traced with JIT." - ) - except ImportError: - gelu_new = torch.jit.script(gelu_new) ACT2FN = { "relu": F.relu,