ComputeInstance "created_on" attribute is empty
Type of issue
Code doesn't work
Description
ComputeInstance.created_on is always empty, even though the value can be retrieved via sdk_v1.
Example with sdk v2:
# get a handle to the workspace
from azure.ai.ml import MLClient
from azure.identity import DefaultAzureCredential
from azure.ai.ml.entities import ComputeInstance, AmlCompute
ml_client = MLClient.from_config(credential=DefaultAzureCredential())
# get compute instance by name
ci_handler = ml_client.compute.get('delete-me')
print(ci_handler.created_on)
>> None
Example old sdk v1:
from azureml.core import Workspace, ComputeTarget
ws = Workspace.from_config()
compute_list = ComputeTarget.list(ws)
compute_name = "delete-me"
compute_instance = next((c for c in compute_list if c.name == compute_name), None)
print(compute_instance.created_on)
>> 2024-01-19 10:55:01.722176+00:00
Page URL
https://learn.microsoft.com/en-us/python/api/azure-ai-ml/azure.ai.ml.entities.computeinstance?view=azure-python
Content source URL
https://github.com/MicrosoftDocs/azure-docs-sdk-python/blob/main/docs-ref-autogen/azure-ai-ml/azure.ai.ml.entities.ComputeInstance.yml
Document Version Independent Id
7ab02ac5-652c-6123-d71c-e5fd6ea6277b
Article author
@lmazuel
Metadata
- ID: 48a9ae21-e8f7-7919-ec01-9355d0b200c8
- Service: machine-learning
Thank you for the feedback @masgra . We will investigate and get back to you asap.
cc @azureml-github
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.
Hi @masgra , thank you for bringing this to our attention. There is a fix for this bug coming in the Feburary SDK v2 release.
https://github.com/Azure/azure-sdk-for-python/pull/33661