run = Run.get_context()
run_id = run.run_id
Produces the error
AttributeError: '_SubmittedRun' object has no attribute 'run_id'
Surely this is how the documentation describes getting the run_id programatically?
I think we have a bug in our documentation so it's a bit confusing. This section should render the actual property names but doesn't appear to be doing so: https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.run(class)?view=azure-ml-py#attributes
I believe you want run.id instead of run.run_id
@akshaya-a - is there a doc bug somewhere to track this?
In our case, we used the parent's id (the submitted pipeline current run id instead of the step id) :
from azureml.core import Run
run = Run.get_context()
run.parent.id
Most helpful comment
I think we have a bug in our documentation so it's a bit confusing. This section should render the actual property names but doesn't appear to be doing so: https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.run(class)?view=azure-ml-py#attributes
I believe you want run.id instead of run.run_id