Quint Van Leeuwen
12/20/2024, 10:55 AMenv = Environment(
name="setup_env",
conda_file="conda.yaml",
image="mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04",
)
# Register the environment
ml_client.environments.create_or_update(env)
Then the next step is to deploy model to Batch endpoint:
deployment = BatchDeployment(
name="deployment_name",
description="A regression model",
environment=ml_client.environments.get("setup_env", label="latest"),
endpoint_name=endpoint.name,
model=model,
compute="batch-cluster",
instance_count=2,
max_concurrency_per_instance=2,
mini_batch_size=2,
output_action=BatchDeploymentOutputAction.APPEND_ROW,
output_file_name="predictions.csv",
retry_settings=BatchRetrySettings(max_retries=3, timeout=300),
logging_level="info",
)
ml_client.batch_deployments.begin_create_or_update(deployment)
Then, after submitting a batch job to this endpoint to test if the endpoint can return a prediction value, an environment error appears.
job = ml_client.batch_endpoints.invoke(
endpoint_name=endpoint.name,
input=input)
ml_client.jobs.get(job.name)
The error in Azure ML studio is in the 'prepare_image' job. This is part of the std_log:
2024-12-16T153256: ERROR: Cannot install -r /azureml-environment-setup/condaenv.lqbo0q79.requirements.txt (line 1), -r /azureml-environment-setup/condaenv.lqbo0q79.requirements.txt (line 12), -r /azureml-environment-setup/condaenv.lqbo0q79.requirements.txt (line 13), -r /azureml-environment-setup/condaenv.lqbo0q79.requirements.txt (line 6), -r /azureml-environment-setup/condaenv.lqbo0q79.requirements.txt (line 7), -r /azureml-environment-setup/condaenv.lqbo0q79.requirements.txt (line 9), azureml-dataset-runtime[fuse]==1.10.0, azureml-dataset-runtime[fuse]==1.11.0, azureml-dataset-runtime[fuse]==1.11.0.post1, azureml-dataset-runtime[fuse]==1.12.0, azureml-dataset-runtime[fuse]==1.13.0, azureml-dataset-runtime[fuse]==1.14.0, azureml-dataset-runtime[fuse]==1.15.0, azureml-dataset-runtime[fuse]==1.16.0, azureml-dataset-runtime[fuse]==1.17.0, azureml-dataset-runtime[fuse]==1.18.0, azureml-dataset-runtime[fuse]==1.19.0, azureml-dataset-runtime[fuse]==1.19.0.post1, azureml-dataset-runtime[fuse]==1.20.0, azureml-dataset-runtime[fuse]==1.21.0, azureml-dataset-runtime[fuse]==1.22.0, azureml-dataset-runtime[fuse]==1.23.0, azureml-dataset-runtime[fuse]==1.24.0, azureml-dataset-runtime[fuse]==1.25.0, azureml-dataset-runtime[fuse]==1.26.0, azureml-dataset-runtime[fuse]==1.27.0, azureml-dataset-runtime[fuse]==1.28.0, azureml-dataset-runtime[fuse]==1.29.0, azureml-dataset-runtime[fuse]==1.30.0, azureml-dataset-runtime[fuse]==1.31.0, azureml-dataset-runtime[fuse]==1.32.0, azureml-dataset-runtime[fuse]==1.33.0, azureml-dataset-runtime[fuse]==1.34.0, azureml-dataset-runtime[fuse]==1.35.0, azureml-dataset-runtime[fuse]==1.36.0, azureml-dataset-runtime[fuse]==1.37.0, azureml-dataset-runtime[fuse]==1.38.0, azureml-dataset-runtime[fuse]==1.39.0, azureml-dataset-runtime[fuse]==1.40.0, azureml-dataset-runtime[fuse]==1.41.0, azureml-dataset-runtime[fuse]==1.42.0, azureml-dataset-runtime[fuse]==1.43.0, azureml-dataset-runtime[fuse]==1.43.0.post1, azureml-dataset-runtime[fuse]==1.43.0.post2, azureml-dataset-runtime[fuse]==1.44.0, azureml-dataset-runtime[fuse]==1.45.0, azureml-dataset-runtime[fuse]==1.46.0, azureml-dataset-runtime[fuse]==1.47.0, azureml-dataset-runtime[fuse]==1.48.0, azureml-dataset-runtime[fuse]==1.49.0, azureml-dataset-runtime[fuse]==1.50.0, azureml-dataset-runtime[fuse]==1.51.0, azureml-dataset-runtime[fuse]==1.52.0, azureml-dataset-runtime[fuse]==1.53.0, azureml-dataset-runtime[fuse]==1.54.0, azureml-dataset-runtime[fuse]==1.54.0.post1, azureml-dataset-runtime[fuse]==1.55.0, azureml-dataset-runtime[fuse]==1.56.0, azureml-dataset-runtime[fuse]==1.57.0, azureml-dataset-runtime[fuse]==1.58.0, azureml-dataset-runtime[fuse]==1.59.0, numpy==1.26.4 and pyarrow==18.1.0 because these package versions have conflicting dependencies.
Finally, whenever I register another model that is not trained by a Kedro pipeline, but by an Azure ML pipeline, and then follow a similar approach in deploying that, then the deployment and inference works fine. Therefore I think the error has something to do with the training of the model by the Kedro pipeline... Is this familiar to any of you?Hall
12/20/2024, 10:55 AMJuan Luis
12/20/2024, 11:56 AMazureml-dataset-runtime[fuse]
. do you know who generated those requirements?
trying to install azureml-dataset-runtime[fuse]==1.10.0
and azureml-dataset-runtime[fuse]==1.11.0
will already be incompatible 🤔Quint Van Leeuwen
12/20/2024, 2:41 PMazureml-dataset-runtime[fuse]
requirements come from. This library is not defined in my conda.yaml fileJuan Luis
12/20/2024, 3:21 PM