Share via

Error while deploying an Webservice using an ACI

Vincent Coulombe 6 Reputation points
2021-06-16T14:20:56.203+00:00

Hi,

I am receiving the following message when I try the deploy a webservice using azure SDK.

"message": "Your container application crashed. This may be caused by errors in your scoring file's init() function.

NOTE : here is my init():

**def init():
try:
global model_cbf
global model_frequenceAchat
global date_ajd
global model_cf
global Feature
global Empty_Feature
global MultiSparseInfo

    model_path_cbf = Model.get_model_path("content-based_filtering")    
    model_cbf = joblib.load(model_path_cbf)

    model_path_frequence_achat = Model.get_model_path("frequence_dachat")
    model_frequenceAchat = joblib.load(model_path_frequence_achat)    
    date_ajd = datetime.datetime(2014, 7, 8)

    Feature = namedtuple("Feature", ["name", "index"])
    Empty_Feature = Feature(name=[], index=[])

    MultiSparseInfo = namedtuple("MultiSparseInfo",
                             ["field_offset", "field_len", "feat_oov"])

    model_cf_data = Model.get_model_path("donnees_collaborative_filtering") 
    data_info = DataInfo.load2(model_cf_data[1])
    model_cf = SVD(task = model_cf_data[0]['task'], data_info = data_info)
    model_cf.load2(model_cf_data[2])
except:
    Exception as e:
    print(str(e))**

I suspect that the presence of a class definition in the entry script might be the problem. What do you guys think?

Thank you,

Vincent

Azure Machine Learning

1 answer

Sort by: Most helpful
  1. Vincent Coulombe 6 Reputation points
    2021-06-17T13:59:29.327+00:00

    Hi,

    Thank you for the quick response.

    The error was that I wasnt deserializing the model "donnees_collaborative_filtering".

    Vincent

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.