bump ms version (#2449)

This commit is contained in:
tastelikefeet 2024-11-13 22:39:36 +08:00 committed by GitHub
parent 490349a676
commit 78b6f78155
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 20 deletions

View File

@ -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

View File

@ -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')