diff --git a/requirements/framework.txt b/requirements/framework.txt index d0d5c6aa3..bb29f2f71 100644 --- a/requirements/framework.txt +++ b/requirements/framework.txt @@ -4,10 +4,12 @@ aiohttp attrdict binpacking dacite +datasets>=3.0 einops importlib_metadata jieba matplotlib +modelscope[datasets]>=1.19 nltk numpy<2.0 oss2 diff --git a/setup.py b/setup.py index 51b900624..3d70a89fa 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,9 @@ # Copyright (c) Alibaba, Inc. and its affiliates. # !/usr/bin/env python import os -import shutil from setuptools import find_packages, setup from typing import List -from packaging import version - def readme(): with open('README.md', encoding='utf-8') as f: @@ -118,25 +115,8 @@ def parse_requirements(fname='requirements.txt', with_version=True): return gen_packages_items() -def add_modelscope_requirement(install_requires: List[str]) -> None: - # The future version will remove. - try: - import modelscope - modelscope_version = modelscope.__version__ - except ImportError: - modelscope_version = '1.18' - - if version.parse(modelscope_version) >= version.parse('1.19'): - install_requires.append('datasets>=3.0') - install_requires.append('modelscope[datasets]>=1.19') - else: - install_requires.append('datasets<3.0') - install_requires.append('modelscope[datasets]>=1.17,<1.19') - - if __name__ == '__main__': install_requires, deps_link = parse_requirements('requirements.txt') - add_modelscope_requirement(install_requires) extra_requires = {} all_requires = [] extra_requires['llm'], _ = parse_requirements('requirements/llm.txt')