Hi I'm trying to publish my model to the public, unfortunately azure ml has a different opinion. The error that I'm getting is when trying to publish it locally first, with the following command:
blue_deployment = ManagedOnlineDeployment(
name="yolo11-retail-ocr-2-v8",
endpoint_name=endpoint_name,
model=model_asset_name,
instance_type="Standard_E16s_v3",
instance_count=1,
environment=env,
scoring_script="score-copy.py",
code_path='./YOLO11 Finetuned Model'
)
ml_client.online_deployments.begin_create_or_update(blue_deployment, local=True)
First I'm getting
Creating local deployment (hf-ep-1740504777 / yolo11-retail-ocr-2-v8) .Done (0m 5s)
And after that the error appreas:
ValidationException: (x) Must provide either version or label
Which is odd as I have a registered model with a version attached to it. I have a workng custom environment and an endpoint.
Hi I'm trying to publish my model to the public, unfortunately azure ml has a different opinion. The error that I'm getting is when trying to publish it locally first, with the following command:
blue_deployment = ManagedOnlineDeployment(
name="yolo11-retail-ocr-2-v8",
endpoint_name=endpoint_name,
model=model_asset_name,
instance_type="Standard_E16s_v3",
instance_count=1,
environment=env,
scoring_script="score-copy.py",
code_path='./YOLO11 Finetuned Model'
)
ml_client.online_deployments.begin_create_or_update(blue_deployment, local=True)
First I'm getting
Creating local deployment (hf-ep-1740504777 / yolo11-retail-ocr-2-v8) .Done (0m 5s)
And after that the error appreas:
ValidationException: (x) Must provide either version or label
Which is odd as I have a registered model with a version attached to it. I have a workng custom environment and an endpoint.
The error you are getting because of the model you are passing.
Either you need to pass model object
model = Model(...)
blue_deployment = ManagedOnlineDeployment(
name="blue",
endpoint_name=endpoint_name,
model=model,
environment=env,
code_configuration=CodeConfiguration(
code="../model-1/onlinescoring", scoring_script="score.py"
),
instance_type="Standard_DS3_v2",
instance_count=1,
)
or string with model name and version like below.
blue_deployment = ManagedOnlineDeployment(
name="blue",
endpoint_name=endpoint_name,
model="<model_name:version>",#health_classifier:1
environment=env,
code_configuration=CodeConfiguration(
code="../model-1/onlinescoring", scoring_script="score.py"
),
instance_type="Standard_DS3_v2",
instance_count=1,
)
Please refer this for more information on parameter to managed online deployment.