diff --git a/cmake/check_requirements.cmake b/cmake/check_requirements.cmake index 266b05d..cc501c9 100644 --- a/cmake/check_requirements.cmake +++ b/cmake/check_requirements.cmake @@ -1,7 +1,7 @@ ## define customized find fucntions, print customized error messages function(find_required_package pkg_name) find_package(${pkg_name}) - if (NOT ${pkg_name}_FOUND) + if(NOT ${pkg_name}_FOUND) message(FATAL_ERROR "Required package ${pkg_name} not found, please install the package and try building mindspore_serving again.") endif() endfunction() @@ -9,31 +9,36 @@ endfunction() ## find python, quit if the found python is static set(Python3_USE_STATIC_LIBS FALSE) find_package(Python3 COMPONENTS Interpreter Development) -if (Python3_FOUND) +if(Python3_FOUND) message("Python3 found, version: ${Python3_VERSION}") - message("Python3 library path: ${Python3_LIBRARY_DIRS}") + message("Python3 library path: ${Python3_LIBRARY}") message("Python3 interpreter: ${Python3_EXECUTABLE}") - else() +elseif(Python3_LIBRARY AND Python3_EXECUTABLE AND + ${Python3_VERSION} VERSION_GREATER_EQUAL "3.7.0" AND ${Python3_VERSION} VERSION_LESS "3.8.0") + message(WARNING "Maybe python3 environment is broken.") + message("Python3 library path: ${Python3_LIBRARY}") + message("Python3 interpreter: ${Python3_EXECUTABLE}") +else() message(FATAL_ERROR "Python3 not found, please install Python>=3.7.5, and set --enable-shared " "if you are building Python locally") -endif () +endif() ## packages used both on windows and linux -if (DEFINED ENV{MS_PATCH_PATH}) +if(DEFINED ENV{MS_PATCH_PATH}) find_program(Patch_EXECUTABLE patch PATHS $ENV{MS_PATCH_PATH}) set(Patch_FOUND ${Patch_EXECUTABLE}) -else () +else() find_package(Patch) -endif () -if (NOT Patch_FOUND) +endif() +if(NOT Patch_FOUND) message(FATAL_ERROR "Patch not found, please set environment variable MS_PATCH_PATH to path where Patch is located, " "usually found in GIT_PATH/usr/bin on Windows") -endif () +endif() message(PATCH_EXECUTABLE = ${Patch_EXECUTABLE}) find_required_package(Threads) ## packages used on Linux -if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") +if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows") find_required_package(OpenSSL) endif() diff --git a/mindspore_serving/worker/_worker.py b/mindspore_serving/worker/_worker.py index a666c93..a12d93d 100644 --- a/mindspore_serving/worker/_worker.py +++ b/mindspore_serving/worker/_worker.py @@ -181,6 +181,7 @@ def start_servable_in_master(servable_directory, servable_name, version_number=0 "Ascend" means the device type can be Ascend910 or Ascend310, etc. "Davinci" has the same meaning as "Ascend". None means the device type is determined by the MindSpore environment. + device_id (int): The id of the device the model loads into and runs in. Examples: >>> import os diff --git a/setup.py b/setup.py index 9997623..3dee976 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ from setuptools import setup, find_packages from setuptools.command.egg_info import egg_info from setuptools.command.build_py import build_py -version = '1.1.1' +version = '1.1.2' backend_policy = os.getenv('BACKEND_POLICY') commit_id = os.getenv('COMMIT_ID').replace("\n", "") diff --git a/third_party/mindspore b/third_party/mindspore index 593952f..a7bbe13 160000 --- a/third_party/mindspore +++ b/third_party/mindspore @@ -1 +1 @@ -Subproject commit 593952fcdf701a43acbbcccfc8f34b4592151af7 +Subproject commit a7bbe134b54174a30169d978bef3a58599af1aa1