I have a train.py script that I pass to an Estimator and Hyperdrive.
I will call the script directly on my local machine as I'm developing using sample data to make sure it works as I intend.
In the script, following AML SDK code is interspersed:
from azureml.core import Run
run.log('precision', pr_score)
run.log('recall', re_score)
This runs without error and the console will print:
Attempted to log scalar metric precision:
0.061224489795918366
Attempted to log scalar metric recall:
0.35691318327974275
However, if I add the line:
run.tag('test', value = 1)
this error is thrown:
AttributeError: '_OfflineRun' object has no attribute 'tag'
In reality, I don't care if the tagging actually happens or not, I just want the ability to run the script locally without having to comment out the tagging lines. Is way to can call Run.tag() conditionally? What condition could I use?
We are working on a fix for the next release. We will also add a few extra upload_* calls to cover more scenarios for local debugging. Thanks for the feedback.
@eedeleon @kenkadota is this resolved? or is it just being closed?
@swanderz this has been fixed, please upgrade to the latest version of Azure ML SDK and give it a try.