From f344d8bd31b3da585a73cc98d5009c5b7b730381 Mon Sep 17 00:00:00 2001 From: WillQvQ Date: Thu, 28 Oct 2021 15:22:00 +0800 Subject: [PATCH 1/3] Update Python version to 3.7 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 714a7e42..1ebd4b7f 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ setup( long_description_content_type='text/markdown', license='Apache License', author='Fudan FastNLP Team', - python_requires='>=3.6', + python_requires='>=3.7', packages=pkgs, install_requires=reqs.strip().split('\n'), ) From f377237236abdd0d2a46b274d3e4e9d7908884f3 Mon Sep 17 00:00:00 2001 From: WillQvQ Date: Thu, 28 Oct 2021 15:39:16 +0800 Subject: [PATCH 2/3] Update readthedocs.yml --- readthedocs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readthedocs.yml b/readthedocs.yml index e6d5bafd..e66e81fa 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -7,10 +7,10 @@ build: image: latest python: - version: 3.6 + version: 3.7 install: - method: setuptools path: . formats: - - htmlzip \ No newline at end of file + - htmlzip From 9bfc75f4af0c7d635fb3c2ab5b2d47ac925c879b Mon Sep 17 00:00:00 2001 From: WillQvQ Date: Fri, 29 Oct 2021 10:08:59 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=20readthedocs?= =?UTF-8?q?=20=E7=9A=84=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/requirements.txt | 12 ++++-------- docs/source/tutorials/文本分类.rst | 4 ++-- readthedocs.yml | 1 + 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index c7d94486..cfa9c93a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,8 +1,4 @@ -numpy>=1.14.2 -http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl -torchvision>=0.1.8 -sphinx-rtd-theme==0.4.1 -tensorboardX>=1.4 -tqdm>=4.28.1 -ipython>=6.4.0 -ipython-genutils>=0.2.0 \ No newline at end of file +sphinx==3.2.1 +docutils==0.16 +sphinx-rtd-theme==0.5.0 +readthedocs-sphinx-search==0.1.0rc3 \ No newline at end of file diff --git a/docs/source/tutorials/文本分类.rst b/docs/source/tutorials/文本分类.rst index 73686916..30f6cf4f 100644 --- a/docs/source/tutorials/文本分类.rst +++ b/docs/source/tutorials/文本分类.rst @@ -291,7 +291,7 @@ fastNLP提供了Trainer对象来组织训练过程,包括完成loss计算(所 PS: 使用Bert进行文本分类 -~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: python @@ -368,7 +368,7 @@ PS: 使用Bert进行文本分类 PS: 基于词进行文本分类 -~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 由于汉字中没有显示的字与字的边界,一般需要通过分词器先将句子进行分词操作。 下面的例子演示了如何不基于fastNLP已有的数据读取、预处理代码进行文本分类。 diff --git a/readthedocs.yml b/readthedocs.yml index e66e81fa..73935f9a 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -9,6 +9,7 @@ build: python: version: 3.7 install: + - requirements: docs/requirements.txt - method: setuptools path: .