Browse Source

!169 Serving, r1.1.2

From: @xu-yfei
Reviewed-by: @zhangyinxia,@zhoufeng54
Signed-off-by: @zhoufeng54
r1.1
mindspore-ci-bot Gitee 5 years ago
parent
commit
b38ccc471c
4 changed files with 19 additions and 13 deletions
  1. +16
    -11
      cmake/check_requirements.cmake
  2. +1
    -0
      mindspore_serving/worker/_worker.py
  3. +1
    -1
      setup.py
  4. +1
    -1
      third_party/mindspore

+ 16
- 11
cmake/check_requirements.cmake View File

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

+ 1
- 0
mindspore_serving/worker/_worker.py View File

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


+ 1
- 1
setup.py View File

@@ -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", "")


+ 1
- 1
third_party/mindspore

@@ -1 +1 @@
Subproject commit 593952fcdf701a43acbbcccfc8f34b4592151af7
Subproject commit a7bbe134b54174a30169d978bef3a58599af1aa1

Loading…
Cancel
Save