From 56a28d3503c8b22c707c7c2d7249e8183426cf56 Mon Sep 17 00:00:00 2001 From: yaohaolin Date: Sat, 25 Oct 2025 17:14:57 +0800 Subject: [PATCH] sync codes --- NOTICE | 2 +- README.md | 4 ++-- VERSION | 2 +- build.sh | 4 ++-- cli/__init__.py | 2 +- cmake/scripts/PackagePython.cmake.in | 2 +- cmake/util.cmake | 8 ------- docs/README_CN.md | 2 +- docs/source_zh_cn/appendix/dscli.md | 2 +- docs/source_zh_cn/getting-started/deploy.md | 2 +- docs/source_zh_cn/getting-started/install.md | 2 +- install_tools.sh | 4 +--- python/setup.py | 12 +++++++++-- setup.py | 22 +++++++------------- tests/kvconnector/README.md | 6 ++---- tests/python/prefetch_tests/start_worker.sh | 2 +- 16 files changed, 34 insertions(+), 44 deletions(-) diff --git a/NOTICE b/NOTICE index 94c43f0..76d9056 100644 --- a/NOTICE +++ b/NOTICE @@ -1,2 +1,2 @@ -yr-datasystem +yuanrong-datasystem Copyright 2025-2025 Huawei Technologies Co., Ltd diff --git a/README.md b/README.md index 6a80e22..ee2852c 100644 --- a/README.md +++ b/README.md @@ -70,12 +70,12 @@ yuanrong-datasystem 的部署视图如上图所示: - 安装 yuanrong-datasystem 完整发行版(包含Python SDK、C++ SDK以及命令行工具): ```bash - pip install yuanrong-datasystem + pip install pip install https://openyuanrong.obs.cn-southwest-2.myhuaweicloud.com/openyuanrong_datasystem-0.5.0-cp39-cp39-manylinux_2_34_x86_64.whl ``` - 仅安装 yuanrong-datasystem Python SDK(不包含C++ SDK以及命令行工具): ```bash - pip install yuanrong-datasystem-sdk + pip install pip install https://openyuanrong.obs.cn-southwest-2.myhuaweicloud.com/openyuanrong_datasystem_sdk-0.5.0-cp39-cp39-manylinux_2_34_x86_64.whl ``` #### 源码编译方式安装 diff --git a/VERSION b/VERSION index baa3488..79a2734 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.0-alpha \ No newline at end of file +0.5.0 \ No newline at end of file diff --git a/build.sh b/build.sh index adbe4bb..65bf1a7 100755 --- a/build.sh +++ b/build.sh @@ -315,7 +315,7 @@ function run_example() { export LD_LIBRARY_PATH=$new_ld_path echo -e "---- Sanitize LD_LIBRARY_PATH from ${old_ld_path} to ${new_ld_path}" - python3 -m pip install ${INSTALL_DIR}/yr_datasystem-*.whl --force-reinstall + python3 -m pip install ${INSTALL_DIR}/openyuanrong_datasystem-*.whl --force-reinstall bash "${DATASYSTEM_DIR}/example/run-example.sh" "${BUILD_HETERO}" "${ENABLE_PERF}" || (remove_running_pids && go_die "---- Smoke Testing failed!") echo -e "---- Smoke Testing success!" @@ -421,7 +421,7 @@ function run_manual_ut() local baseTime_s baseTime_s=$(date +%s) if [[ "${RUN_TESTS}" = "run_python" ]]; then - python3 -m pip install ${INSTALL_DIR}/yr_datasystem-*.whl --force-reinstall + python3 -m pip install ${INSTALL_DIR}/openyuanrong_datasystem-*.whl --force-reinstall fi start_all "${BUILD_DIR}" "${INSTALL_DIR}" run_ut_python diff --git a/cli/__init__.py b/cli/__init__.py index 0e99a07..d2a5f0c 100644 --- a/cli/__init__.py +++ b/cli/__init__.py @@ -20,4 +20,4 @@ __all__ = [ '__version__', ] -__version__ = importlib.metadata.version("yr-datasystem") +__version__ = importlib.metadata.version("openyuanrong-datasystem") diff --git a/cmake/scripts/PackagePython.cmake.in b/cmake/scripts/PackagePython.cmake.in index 00b2cbb..87ba161 100644 --- a/cmake/scripts/PackagePython.cmake.in +++ b/cmake/scripts/PackagePython.cmake.in @@ -21,6 +21,6 @@ execute_process(COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel WORKING_DIRECTORY ${PYTHON_PACKAGE_PATH}) file(GLOB ORIGIN_WHEEL "python_api/dist/*.whl") # Rename origin wheel file and move to install path. -file(RENAME ${ORIGIN_WHEEL} ${CMAKE_INSTALL_PATH}/${TARGET_WHEEL}) +file(COPY ${ORIGIN_WHEEL} DESTINATION ${CMAKE_INSTALL_PATH}) # Remove temporary package path file(REMOVE_RECURSE ${PYTHON_PACKAGE_PATH}) \ No newline at end of file diff --git a/cmake/util.cmake b/cmake/util.cmake index 5875159..5127204 100644 --- a/cmake/util.cmake +++ b/cmake/util.cmake @@ -833,14 +833,6 @@ function(PACKAGE_PYTHON PACKAGE_NAME) # Copy VERSION and LICENSE to package lib path install(FILES ${CMAKE_SOURCE_DIR}/VERSION ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION ${PYTHON_PACKAGE_LIBPATH}) - # Prepare variable needed in pacakge_python.cmake.in - set(PY_TAGS cp${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}-cp${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}) - # Before Python3.8, python whl filename need abiflags 'm' for pymalloc - if (${Python3_VERSION_MINOR} LESS_EQUAL "7") - set(PY_TAGS "${PY_TAGS}m") - endif () - string(TOLOWER ${CMAKE_HOST_SYSTEM_NAME}_${CMAKE_HOST_SYSTEM_PROCESSOR} PLATFORM_TAG) - set(TARGET_WHEEL "yr_datasystem_sdk-${DATASYSTEM_VERSION}-${PY_TAGS}-${PLATFORM_TAG}.whl") set(CONFIG_PACKAGE_SCRIPT ${CMAKE_BINARY_DIR}/PackagePythonSDK.cmake) # Generate PackagePythonSDK.cmake to run setup.py configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/PackagePython.cmake.in diff --git a/docs/README_CN.md b/docs/README_CN.md index a20bd35..a9431b0 100644 --- a/docs/README_CN.md +++ b/docs/README_CN.md @@ -22,7 +22,7 @@ yr-datasystem的教程和API文档均可由[Sphinx](https://www.sphinx-doc.org/e 1. 使用pip安装yr-datasystem模块,API文档需要根据安装后的yr-datasystem模块生成,参考[安装](source_zh_cn/getting-started/install.md)。 ```bash - pip install yr_datasystem-*.whl + pip install openyuanrong_datasystem-*.whl ``` 2. 安装Doxygen diff --git a/docs/source_zh_cn/appendix/dscli.md b/docs/source_zh_cn/appendix/dscli.md index 456002f..5dade6b 100644 --- a/docs/source_zh_cn/appendix/dscli.md +++ b/docs/source_zh_cn/appendix/dscli.md @@ -215,7 +215,7 @@ pip install yr-datasystem export version="0.1" # 指定Python版本为3.11 export py_version="311" -pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/${version}/yr_datasystem/any/yr_datasystem-${version}-cp${py_version}-cp${py_version}-linux_x86_64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple +pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/${version}/yr_datasystem/any/openyuanrong_datasystem-${version}-cp${py_version}-cp${py_version}-linux_x86_64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple ``` ### 源码编译安装 diff --git a/docs/source_zh_cn/getting-started/deploy.md b/docs/source_zh_cn/getting-started/deploy.md index f33e83f..7ffb05f 100644 --- a/docs/source_zh_cn/getting-started/deploy.md +++ b/docs/source_zh_cn/getting-started/deploy.md @@ -87,7 +87,7 @@ python --version ``` ### 安装dscli -dscli命令行工具集成在yr-datasystem的wheel包 `yr_datasystem--cp311-cp311-manylinux2014_.whl`中,安装yr-datasystem请参考[安装yr-datasystem](install.md)。 +dscli命令行工具集成在yr-datasystem的wheel包 `openyuanrong_datasystem--cp311-cp311-manylinux_2_34_.whl`中,安装yr-datasystem请参考[安装yr-datasystem](install.md)。 安装完成后,运行如下命令: ```bash diff --git a/docs/source_zh_cn/getting-started/install.md b/docs/source_zh_cn/getting-started/install.md index 1ce3a53..24f6773 100644 --- a/docs/source_zh_cn/getting-started/install.md +++ b/docs/source_zh_cn/getting-started/install.md @@ -229,5 +229,5 @@ bash build.sh ### 安装yr-datasystem ```bash -pip install output/yr_datasystem-*.whl +pip install output/openyuanrong_datasystem-*.whl ``` diff --git a/install_tools.sh b/install_tools.sh index 4f2d44d..3c96f5e 100644 --- a/install_tools.sh +++ b/install_tools.sh @@ -29,7 +29,7 @@ case "$ARCH" in ;; aarch64) ARCH_TAG="aarch64" - BAZEL_ARCH="arm64" + BAZEL_ARCH="aarch64" echo "Detected aarch64 (ARM64) architecture" ;; *) @@ -129,8 +129,6 @@ else echo "Bazel already installed at /usr/local/bin/bazel" fi - - # --- Install Maven --- if [ ! -d "$BUILD_TOOLS/apache-maven-3.9.11" ]; then echo "Installing Maven..." diff --git a/python/setup.py b/python/setup.py index f4bd0c0..bdb2a8d 100644 --- a/python/setup.py +++ b/python/setup.py @@ -21,6 +21,8 @@ from setuptools import find_packages from setuptools import setup from setuptools.command.egg_info import egg_info from setuptools.command.build_py import build_py +from wheel.bdist_wheel import bdist_wheel as _bdist_wheel +from wheel.vendored.packaging import tags pwd = os.path.dirname(os.path.realpath(__file__)) @@ -28,7 +30,7 @@ version_path = os.path.join(pwd, 'datasystem', 'VERSION') with open(version_path, 'r') as v: version = v.read() -package_name = 'yr-datasystem-sdk' +package_name = 'openyuanrong-datasystem-sdk' commit_id = os.getenv('COMMIT_ID', 'None').replace("\n", "") package_datas = { @@ -78,7 +80,7 @@ class EggInfo(egg_info): """Egg info.""" def run(self): - egg_info_dir = os.path.join(os.path.dirname(__file__), 'yr_datasystem_sdk.egg-info') + egg_info_dir = os.path.join(os.path.dirname(__file__), 'openyuanrong_datasystem_sdk.egg-info') super().run() update_permissions(egg_info_dir) @@ -92,6 +94,11 @@ class BuildPy(build_py): update_permissions(datasystem_lib_dir) +class CustomBdistWheel(_bdist_wheel): + def get_tag(self): + tag = next(tags.sys_tags()) + return tag.interpreter, tag.abi, tag.platform + setup( python_requires='>=3.6', name=package_name, @@ -102,6 +109,7 @@ setup( cmdclass={ 'egg_info': EggInfo, 'build_py': BuildPy, + 'bdist_wheel': CustomBdistWheel }, install_requires=requires, ) diff --git a/setup.py b/setup.py index d4acd13..cd3295d 100644 --- a/setup.py +++ b/setup.py @@ -16,14 +16,13 @@ """setup_package.""" import os -import platform import stat -import sys from setuptools import find_packages, setup from setuptools.command.build_py import build_py from setuptools.command.egg_info import egg_info from wheel.bdist_wheel import bdist_wheel as _bdist_wheel +from wheel.vendored.packaging import tags root_dir = os.path.dirname(os.path.realpath(__file__)) @@ -87,7 +86,7 @@ class EggInfo(egg_info): def run(self): egg_info_dir = os.path.join( - os.path.dirname(__file__), 'yr_datasystem.egg-info') + os.path.dirname(__file__), 'openyuanrong_datasystem.egg-info') super().run() update_permissions(egg_info_dir) @@ -107,21 +106,16 @@ class BuildPy(build_py): class CustomBdistWheel(_bdist_wheel): def get_tag(self): - python_tag = f"cp{sys.version_info.major}{sys.version_info.minor}" - abi_tag = python_tag - system = platform.system().lower() - machine = platform.machine().lower() - if system == "linux": - plat_tag = f"manylinux2014_{machine}" - return python_tag, abi_tag, plat_tag + tag = next(tags.sys_tags()) + return tag.interpreter, tag.abi, tag.platform setup( - name="yr-datasystem", + name="openyuanrong-datasystem", version=version, - author="yr-datasystem Team", + author="openYuanrong Team", description=( - "yr-datasystem is a distributed heterogeneous cache system that supports pooled caching across " + "openyuanrong datasystem is a distributed heterogeneous cache system that supports pooled caching across " "HBM, DDR, and SSD, along with asynchronous, high-efficiency data transmission for NPUs." ), long_description=readme, @@ -159,5 +153,5 @@ setup( 'Topic :: Software Development :: Libraries :: Python Modules', ], license="Apache 2.0", - keywords='mindspore yr-datasystem datasystem', + keywords='openyuanrong-datasystem datasystem', ) diff --git a/tests/kvconnector/README.md b/tests/kvconnector/README.md index ea08642..d3b34ab 100644 --- a/tests/kvconnector/README.md +++ b/tests/kvconnector/README.md @@ -74,13 +74,11 @@ vllm 可以直接使用镜像自带的版本,或者自己参考官网教程下 ## 安装数据系统依赖 -yr_datasystem 是必选项,必须要安装使用。 +openyuanrong_datasystem 是必选项,必须要安装使用。 -dllm 后续会解除依赖,当前还需要安装,并且保证 dllm 和 yr_datasystem 是配套的。 ```shell -pip install yr_datasystem-2.2-cp311-cp311-manylinux2014_aarch64.whl -pip install dllm-0.0.1-cp311-cp311-linux_aarch64.whl +pip install openyuanrong_datasystem-0.5.0-cp311-cp311-manylinux_2_34_aarch64.whl ``` ## 部署执行 diff --git a/tests/python/prefetch_tests/start_worker.sh b/tests/python/prefetch_tests/start_worker.sh index 3caab46..b71e0ed 100755 --- a/tests/python/prefetch_tests/start_worker.sh +++ b/tests/python/prefetch_tests/start_worker.sh @@ -27,7 +27,7 @@ function run_ut_python() { PYTHON=$(which python${PYTHON_VERSION}) || go_die "---- Could not find python${PYTHON_VERSION}, run datasystem testcases failed!" local python_test_dir="${DATASYSTEM_DIR}/tests/python" - ${PYTHON} -m pip install ${INSTALL_DIR}/yr_datasystem-${DATASYSTEM_VERSION}*.whl --force-reinstall + ${PYTHON} -m pip install ${INSTALL_DIR}/openyuanrong_datasystem-${DATASYSTEM_VERSION}*.whl --force-reinstall dscli generate_config -o ${INSTALL_DIR}/service cd ${python_test_dir} ${PYTHON} -m unittest || (remove_running_pids && go_die "---- run datasystem testcases failed!") -- Gitee