in diabetes_regression/scoring/parallel_batchscore.py [0:0]
def init():
"""
Initializer called once per node that runs the scoring job. Parse command
line arguments and get the right model to use for scoring.
"""
try:
print("Initializing batch scoring script...")
# Get the model using name/version/tags filter
model_filter = parse_args()
amlmodel = get_model(
model_name=model_filter[0],
model_version=model_filter[1],
tag_name=model_filter[2],
tag_value=model_filter[3])
# Load the model using name/version found
global model
modelpath = Model.get_model_path(
model_name=amlmodel.name, version=amlmodel.version)
model = joblib.load(modelpath)
print("Loaded model {}".format(model_filter[0]))
except Exception as ex:
print("Error: {}".format(ex))