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.

quick_start.md 2.8 kB

[to #9061073] feat: merge tts to master Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/9061073 Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/9061073 * [to #41669377] docs and tools refinement and release 1. add build_doc linter script 2. add sphinx-docs support 3. add development doc and api doc 4. change version to 0.1.0 for the first internal release version Link: https://code.aone.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/8775307 * [to #41669377] add pipeline tutorial and fix bugs 1. add pipleine tutorial 2. fix bugs when using pipeline with certain model and preprocessor Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/8814301 * refine doc * refine doc * merge remote release/0.1 and fix conflict * Merge branch 'release/0.1' into 'nls/tts' Release/0.1 See merge request !1700968 * [Add] add tts preprocessor without requirements. finish requirements build later * [Add] add requirements and frd submodule * [Fix] remove models submodule * [Add] add am module * [Update] update am and vocoder * [Update] remove submodule * [Update] add models * [Fix] fix init error * [Fix] fix bugs with tts pipeline * merge master * [Update] merge from master * remove frd subdmoule and using wheel from oss * change scripts * [Fix] fix bugs in am and vocoder * [Merge] merge from master * Merge branch 'master' into nls/tts * [Fix] fix bugs * [Fix] fix pep8 * Merge branch 'master' into nls/tts * [Update] remove hparams and import configuration from kwargs * Merge branch 'master' into nls/tts * upgrade tf113 to tf115 * Merge branch 'nls/tts' of gitlab.alibaba-inc.com:Ali-MaaS/MaaS-lib into nls/tts * add multiple versions of ttsfrd * merge master * [Fix] fix cr comments * Merge branch 'master' into nls/tts * [Fix] fix cr comments 0617 * Merge branch 'master' into nls/tts * [Fix] remove comment out codes * [Merge] merge from master * [Fix] fix crash for incompatible tf and pytorch version, and frd using zip file resource * Merge branch 'master' into nls/tts * [Add] add cuda support
3 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # 快速开始
  2. ModelScope Library目前支持tensorflow,pytorch深度学习框架进行模型训练、推理, 在Python 3.7+, Pytorch 1.8+, Tensorflow1.13-1.15,Tensorflow 2.x上测试可运行。
  3. 注: 当前(630)版本 `语音相关`的功能仅支持 python3.7,tensorflow1.13-1.15的`linux`环境使用。 其他功能可以在windows、mac上安装使用。
  4. ## python环境配置
  5. 首先,参考[文档](https://docs.anaconda.com/anaconda/install/) 安装配置Anaconda环境
  6. 安装完成后,执行如下命令为modelscope library创建对应的python环境。
  7. ```shell
  8. conda create -n modelscope python=3.7
  9. conda activate modelscope
  10. ```
  11. ## 安装深度学习框架
  12. * 安装pytorch[参考链接](https://pytorch.org/get-started/locally/)
  13. ```shell
  14. pip install torch torchvision
  15. ```
  16. * 安装Tensorflow[参考链接](https://www.tensorflow.org/install/pip)
  17. ```shell
  18. pip install --upgrade tensorflow
  19. ```
  20. ## ModelScope library 安装
  21. 注: 如果在安装过程中遇到错误,请前往[常见问题](faq.md)查找解决方案。
  22. ### pip安装
  23. 执行如下命令:
  24. ```shell
  25. pip install "modelscope[all]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
  26. ```
  27. 如需体验`语音功能`,请`额外`执行如下命令:
  28. ```shell
  29. pip install "modelscope[audio]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
  30. ```
  31. ### 使用源码安装
  32. 适合本地开发调试使用,修改源码后可以直接执行
  33. 下载源码可以直接clone代码到本地
  34. ```shell
  35. git clone git@gitlab.alibaba-inc.com:Ali-MaaS/MaaS-lib.git modelscope
  36. git fetch origin master
  37. git checkout master
  38. cd modelscope
  39. ```
  40. 安装依赖并设置PYTHONPATH
  41. ```shell
  42. pip install -e ".[all]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
  43. export PYTHONPATH=`pwd`
  44. ```
  45. 注: 6.30版本需要把cv、nlp、multi-modal领域依赖都装上,7.30号各个领域依赖会作为选装,用户需要使用哪个领域安装对应领域依赖即可。
  46. 如需使用语音功能,请执行如下命令安装语音功能所需依赖
  47. ```shell
  48. pip install -e ".[audio]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo
  49. ```
  50. ### 安装验证
  51. 安装成功后,可以执行如下命令进行验证安装是否正确
  52. ```shell
  53. python -c "from modelscope.pipelines import pipeline;print(pipeline('word-segmentation')('今天天气不错,适合 出去游玩'))"
  54. {'output': '今天 天气 不错 , 适合 出去 游玩'}
  55. ```
  56. ## 推理
  57. pipeline函数提供了简洁的推理接口,相关介绍和示例请参考[pipeline使用教程](tutorials/pipeline.md)
  58. ## 训练 & 评估
  59. Trainer类提供了简洁的Finetuning和评估接口,相关介绍和示例请参考[Trainer使用教程](tutorials/trainer.md)