Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding tags to existing jobs #122250

Closed
thegitofdaniel opened this issue May 6, 2024 · 2 comments
Closed

Adding tags to existing jobs #122250

thegitofdaniel opened this issue May 6, 2024 · 2 comments

Comments

@thegitofdaniel
Copy link

Hello team,

Is there documentation on how to use the Python-SDK to add tags to existing jobs?

I have the following snippet that works for existing models:

# https://learn.microsoft.com/en-us/azure/machine-learning/how-to-manage-models?view=azureml-api-2&tabs=python%2Cuse-local
model = ml_client.models.get(name=model_name, version=model_version)
print(model.tags)
model.tags = {'hello': 'world'}
ml_client.models.create_or_update(model) # prints { }
model = ml_client.models.get(name=model_name, version=model_version)
print(model.tags) # prints {'hello': 'world'}

However, a similar implementation for jobs returns an error:

job = ml_client.jobs.get(name=job_id)
print(job.tags) # prints tags
job.tags = {'hello': 'world'}
ml_client.jobs.create_or_update(job) # raises error
job = ml_client.jobs.get(name=job_id)
print(job.tags)

The error is:

HttpResponseError: (UserError) A job with this name already exists. If you are trying to create a new job, use a different name. If you are trying to update an existing job, the existing job's Settings,  Inputs,  Outputs,  Jobs,  InputBindings,  OutputBindings cannot be changed. Only description, tags, displayName, properties, and isArchived can be updated.
Code: UserError
Message: A job with this name already exists. If you are trying to create a new job, use a different name. If you are trying to update an existing job, the existing job's Settings,  Inputs,  Outputs,  Jobs,  InputBindings,  OutputBindings cannot be changed. Only description, tags, displayName, properties, and isArchived can be updated.
Additional Information:Type: ComponentName
Info: {
    "value": "managementfrontend"
}Type: Correlation
Info: {
    "value": {
        "operation": "d73798c94b1ea7ff12610979d5739cfe",
        "request": "f69a44ecb01fac85"
    }
}Type: Environment
Info: {
    "value": "westeurope"
}Type: Location
Info: {
    "value": "westeurope"
}Type: Time
Info: {
    "value": "2024-05-06T08:52:23.80523+00:00"
}Type: InnerError
Info: {
    "value": {
        "code": "Immutable",
        "innerError": {
            "code": "JobPropertyImmutable",
            "innerError": null
        }
    }
}Type: MessageFormat
Info: {
    "value": "A job with this name already exists. If you are trying to create a new job, use a different name. If you are trying to update an existing job, the existing job's{property} cannot be changed. Only description, tags, displayName, properties, and isArchived can be updated."
}Type: MessageParameters
Info: {
    "value": {
        "property": " Settings,  Inputs,  Outputs,  Jobs,  InputBindings,  OutputBindings"
    }
}

Further info:

  • As it's possible to add tags using the UI, I can only imagine it's possible to add tags using the SDK, but the exact syntax is unclear.
  • The error message is confirming it's possible to update tags.
  • The job is a 'PipelineJob'.

I appreaciate your support,
Daniel


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@TPavanBalaji
Copy link

@thegitofdaniel
Thanks for your feedback! We will investigate and update as appropriate.

@AjayBathini-MSFT
Copy link
Contributor

@thegitofdaniel
I'd recommend working closer with our support team via an [Azure support request] (https://docs.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request). Or you can leverage our Q&A forum by posting your issue there so our community, and MVPs can further assist you in troubleshooting this issue or finding potential workarounds.
[Teams Q&A forum] (https://docs.microsoft.com/en-us/answers/topics/46488/office-teams-windows-itpro.html) for technical questions about the configuration and administration of Microsoft Teams on Windows.
[Microsoft Teams Community forum] (https://answers.microsoft.com/en-us/msteams/forum?sort=LastReplyDate&dir=Desc&tab=All&status=all&mod=&modAge=&advFil=&postedAfter=&postedBefore=&threadType=All&isFilterExpanded=false&page=1)
Thank you for your time and patience throughout this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants