PeakyBlinder
PeakyBlinder

Reputation: 1127

Azure ML Studio- Container has crashed. Did your init method fail

I am trying to deploy an ML model through the Azure ML Studio using the notebook itself. The commands we are using can be found here https://learn.microsoft.com/en-us/azure/machine-learning/how-to-deploy-and-where?tabs=python#define-an-inference-configuration

We have registered the model as below-

from azureml.core.model import Model
model = Model.register(ws, model_name="pdmrfull", model_path="pdmrfull.model")

But while running this command-

service = Model.deploy(
    ws,
    "myservice",
    ["pdmrfull.model"],
    dummy_inference_config,
    deployment_config,
    overwrite=True,
)
service.wait_for_deployment(show_output=True)

We are getting the error that container has crashed. Did your init method fail?

  File "/var/azureml-app/pdmscore.py", line 3, in <module>
    from pyspark.ml import Pipeline
ModuleNotFoundError: No module named 'pyspark'

The init method is-

def init():
    pipeline = PipelineModel.load('pdmrfull.model')

Upvotes: 1

Views: 1190

Answers (1)

Priya
Priya

Reputation: 743

The logs are pretty explanatory, ModuleNotFoundError: No module named 'pyspark'. What are all the dependencies that you installed in the deploy configuration(environment)?. Check that, maybe you didn't install pyspark.

Upvotes: 1

Related Questions