azure ml update service erro AttributeError: AttributeError: 'str' object has no attribute 'id'

Akanksha Kothari 1 Reputation point
2021-07-22T01:33:01.717+00:00

I am tying to update existing webservice using new Azure ML package
Its failing with error - AttributeError: 'str' object has no attribute 'id'

Here is the script I am using -

ws = Workspace.get(
        name=workspace_name,
        subscription_id=subscription_id,
        resource_group=resource_group,
        auth=cli_auth)

model = Model.register(model_path = model_path,
                   model_name = model_name,
                   #tags = {"key": "1"},
                   description = model_description,
                   workspace = ws)

image_config = ContainerImage.image_configuration(execution_script="score.py", 
                                              runtime="python", 
                                              conda_file="packagesenv.yml")
image = 'testazureml'
service_name = 'testazureml'

# Retrieve existing service
service = Webservice(name = service_name, workspace = ws)

print(service)

service.update(image,'image.id')

please help
I have been trying with different methods
as - 'id', 'image_id'
its still failing

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,335 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ramr-msft 17,826 Reputation points
    2021-07-22T02:33:24.353+00:00
    0 comments No comments

Your answer

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