in ezsmdeploy/data/model_handler.py [0:0]
def initialize(self, context):
"""
Initialize model. This will be called during model loading time
:param context: Initial context contains model server system properties.
:return:
"""
self.initialized = True
properties = context.system_properties
# Contains the url parameter passed to the load request
model_dir = properties.get("model_dir")
gpu_id = properties.get("gpu_id")
try:
# Load model
self.model = load_model(model_dir)
print("loaded model!")
except:
print("could not load model!")
raise