1. 07 Dec, 2020 1 commit
  2. 23 Nov, 2020 1 commit
    • Jessica Yung's avatar
      Add pip install update to resolve import error in transformers notebook (#8616) · 143b564e
      Jessica Yung authored
      
      
      * Add pip install update to resolve import error
      
      Add pip install upgrade tensorflow-gpu to remove error below:
      ```
      ---------------------------------------------------------------------------
      AttributeError                            Traceback (most recent call last)
      <ipython-input-2-094fadb93f3f> in <module>()
            1 import torch
      ----> 2 from transformers import AutoModel, AutoTokenizer, BertTokenizer
            3 
            4 torch.set_grad_enabled(False)
      
      4 frames
      /usr/local/lib/python3.6/dist-packages/transformers/__init__.py in <module>()
          133 
          134 # Pipelines
      --> 135 from .pipelines import (
          136     Conversation,
          137     ConversationalPipeline,
      
      /usr/local/lib/python3.6/dist-packages/transformers/pipelines.py in <module>()
           46     import tensorflow as tf
           47 
      ---> 48     from .modeling_tf_auto import (
           49         TF_MODEL_FOR_QUESTION_ANSWERING_MAPPING,
           50         TF_MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING,
      
      /usr/local/lib/python3.6/dist-packages/transformers/modeling_tf_auto.py in <module>()
           49 from .configuration_utils import PretrainedConfig
           50 from .file_utils import add_start_docstrings
      ---> 51 from .modeling_tf_albert import (
           52     TFAlbertForMaskedLM,
           53     TFAlbertForMultipleChoice,
      
      /usr/local/lib/python3.6/dist-packages/transformers/modeling_tf_albert.py in <module>()
           22 import tensorflow as tf
           23 
      ---> 24 from .activations_tf import get_tf_activation
           25 from .configuration_albert import AlbertConfig
           26 from .file_utils import (
      
      /usr/local/lib/python3.6/dist-packages/transformers/activations_tf.py in <module>()
           52     "gelu": tf.keras.layers.Activation(gelu),
           53     "relu": tf.keras.activations.relu,
      ---> 54     "swish": tf.keras.activations.swish,
           55     "silu": tf.keras.activations.swish,
           56     "gelu_new": tf.keras.layers.Activation(gelu_new),
      
      AttributeError: module 'tensorflow_core.python.keras.api._v2.keras.activations' has no attribute 'swish'
      ```
      I have tried running the colab after this change and it seems to work fine (all the cells run with no errors).
      
      * Update notebooks/02-transformers.ipynb
      
      only need to upgrade tensorflow, not tensorflow-gpu.
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      143b564e
  3. 02 Nov, 2020 2 commits
  4. 22 Oct, 2020 2 commits
  5. 06 Oct, 2020 1 commit
  6. 05 Oct, 2020 1 commit
  7. 01 Oct, 2020 1 commit
  8. 21 Sep, 2020 1 commit
  9. 17 Sep, 2020 1 commit
  10. 08 Sep, 2020 1 commit
  11. 31 Aug, 2020 1 commit
  12. 30 Aug, 2020 1 commit
  13. 20 Aug, 2020 1 commit
  14. 08 Aug, 2020 1 commit
  15. 28 Jul, 2020 1 commit
  16. 10 Jul, 2020 1 commit
  17. 08 Jul, 2020 2 commits
  18. 01 Jul, 2020 1 commit
  19. 29 Jun, 2020 1 commit
  20. 26 Jun, 2020 2 commits
  21. 24 Jun, 2020 1 commit
  22. 22 Jun, 2020 1 commit
  23. 18 Jun, 2020 1 commit
  24. 03 Jun, 2020 1 commit
  25. 02 Jun, 2020 1 commit
  26. 29 May, 2020 2 commits
  27. 28 May, 2020 3 commits
  28. 26 May, 2020 1 commit
  29. 22 May, 2020 2 commits
  30. 20 May, 2020 1 commit
  31. 19 May, 2020 1 commit
  32. 18 May, 2020 1 commit