From 905a11957d6fd6985405de3bdb11fb4914bfaf07 Mon Sep 17 00:00:00 2001 From: StingNing Date: Thu, 9 Dec 2021 17:55:51 +0800 Subject: [PATCH] update --- docs/source/conf.py | 4 ++-- requirements.txt | 8 ++++---- setup.py | 21 +++++++++++++++++---- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 9e7bd46f..534a174e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -31,8 +31,8 @@ project = 'OpenPrompt' copyright = '{}, {}, Licenced under the Apache License, Version 2.0'.format(datetime.datetime.now().year, author) -version = "v0.1.1" -release = "v0.1.1" +version = "v0.1.2" +release = "v0.1.2" html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] diff --git a/requirements.txt b/requirements.txt index eadecd3d..878eb227 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ -torch==1.9.0 -transformers==4.10.0 +torch>=1.9.0 +transformers>=4.10.0 sentencepiece==0.1.96 -scikit-learn==0.24.2 -tqdm==4.62.2 +scikit-learn>=0.24.2 +tqdm>=4.62.2 tensorboardX nltk yacs diff --git a/setup.py b/setup.py index 935e426f..016298c8 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,23 @@ import setuptools +import os + +def get_requirements(path): + ret = [] + with open(os.path.join(path, "requirements.txt"), encoding="utf-8") as freq: + for line in freq.readlines(): + ret.append( line.strip() ) + return ret + + +path = os.path.dirname(os.path.abspath(__file__)) +requires = get_requirements(path) +print("aaaaa") +print(requires) with open('README.md', 'r') as f: setuptools.setup( name = 'openprompt', - version = '0.1.1', + version = '0.1.2', description = "An open source framework for prompt-learning.", long_description=open("README.md", "r", encoding="utf-8").read(), long_description_content_type="text/markdown", @@ -12,12 +26,11 @@ license="Apache", url="https://github.com/thunlp/OpenPrompt", keywords = ['PLM', 'prompt', 'AI', 'NLP'], - python_requires=">=3.6.0", + python_requires=">=3.8.0", + install_requires=requires, packages=setuptools.find_packages(), classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Intended Audience :: Developers",