You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

error.py 4.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # Copyright (c) Alibaba, Inc. and its affiliates.
  2. # docstyle-ignore
  3. AUDIO_IMPORT_ERROR = """
  4. Audio model import failed: {0}, if you want to use audio releated function, please execute
  5. `pip install modelscope[audio] -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html`
  6. """
  7. # docstyle-ignore
  8. PROTOBUF_IMPORT_ERROR = """
  9. {0} requires the protobuf library but it was not found in your environment. Checkout the instructions on the
  10. installation page of its repo: https://github.com/protocolbuffers/protobuf/tree/master/python#installation and
  11. follow the ones that match your environment.
  12. """
  13. # docstyle-ignore
  14. SENTENCEPIECE_IMPORT_ERROR = """
  15. {0} requires the SentencePiece library but it was not found in your environment. Checkout the instructions on the
  16. installation page of its repo: https://github.com/google/sentencepiece#installation and follow the ones
  17. that match your environment.
  18. """
  19. # docstyle-ignore
  20. SKLEARN_IMPORT_ERROR = """
  21. {0} requires the scikit-learn library but it was not found in your environment. You can install it with:
  22. ```
  23. pip install -U scikit-learn
  24. ```
  25. In a notebook or a colab, you can install it by executing a cell with
  26. ```
  27. !pip install -U scikit-learn
  28. ```
  29. """
  30. # docstyle-ignore
  31. TENSORFLOW_IMPORT_ERROR = """
  32. {0} requires the TensorFlow library but it was not found in your environment. Checkout the instructions on the
  33. installation page: https://www.tensorflow.org/install and follow the ones that match your environment.
  34. """
  35. # docstyle-ignore
  36. TENSORFLOW_IMPORT_WARNING = """
  37. {0} requires the TensorFlow library but it was not found in your environment.
  38. If you don't want to use them, please ignore this message
  39. If you want to use them, please Checkout the instructions on the
  40. installation page: https://www.tensorflow.org/install and follow the ones that match your environment.
  41. """
  42. # docstyle-ignore
  43. TIMM_IMPORT_ERROR = """
  44. {0} requires the timm library but it was not found in your environment. You can install it with pip:
  45. `pip install timm`
  46. """
  47. # docstyle-ignore
  48. TOKENIZERS_IMPORT_ERROR = """
  49. {0} requires the 🤗 Tokenizers library but it was not found in your environment. You can install it with:
  50. ```
  51. pip install tokenizers
  52. ```
  53. In a notebook or a colab, you can install it by executing a cell with
  54. ```
  55. !pip install tokenizers
  56. ```
  57. """
  58. # docstyle-ignore
  59. PYTORCH_IMPORT_ERROR = """
  60. {0} requires the PyTorch library but it was not found in your environment. Checkout the instructions on the
  61. installation page: https://pytorch.org/get-started/locally/ and follow the ones that match your environment.
  62. """
  63. # docstyle-ignore
  64. SCIPY_IMPORT_ERROR = """
  65. {0} requires the scipy library but it was not found in your environment. You can install it with pip:
  66. `pip install scipy`
  67. """
  68. # docstyle-ignore
  69. OPENCV_IMPORT_ERROR = """
  70. {0} requires the opencv library but it was not found in your environment. You can install it with pip:
  71. `pip install opencv-python`
  72. """
  73. PILLOW_IMPORT_ERROR = """
  74. {0} requires the Pillow library but it was not found in your environment. You can install it with pip:
  75. `pip install Pillow`
  76. """
  77. GENERAL_IMPORT_ERROR = """
  78. {0} requires the REQ library but it was not found in your environment. You can install it with pip:
  79. `pip install REQ`
  80. """
  81. DECORD_IMPORT_ERROR = """
  82. {0} requires the decord library but it was not found in your environment. You can install it with pip:
  83. `pip install decord>=0.6.0`
  84. """
  85. # docstyle-ignore
  86. DEEPSPEED_IMPORT_ERROR = """
  87. {0} requires the Deepspeed library but it was not found in your environment. Checkout the instructions on the
  88. installation page: https://www.deepspeed.ai/tutorials/advanced-install/ and follow the ones that match your environment.
  89. """
  90. # docstyle-ignore
  91. FAIRSEQ_IMPORT_ERROR = """
  92. {0} requires the fairseq library but it was not found in your environment.
  93. You can install it with pip on linux:
  94. `pip install fairseq`
  95. On windows, please checkout the instructions on the
  96. installation page: https://github.com/facebookresearch/fairseq and follow the ones that match your environment.
  97. """