microsoft / hi-ml

HI-ML toolbox for deep learning for medical imaging and Azure integration
https://aka.ms/hi-ml
MIT License
265 stars 59 forks source link

SDKv2 Runs - `aml_workspace` ignored, error message and documentation could be improved. #918

Open ozan-oktay opened 8 months ago

ozan-oktay commented 8 months ago

Currently, the implementation allows users to pass in the arguments aml_workspace and strictly_aml_v1=False to submit_to_azure_if_needed for sdk v2 runs; however, the workspace argument is not utilised in the v2 pathway of the method. With the recent changes (0.3.1 to 0.4.1), the method solely relies on the config file path to retrieve workspace for v2 runs. This could be better documented in the function docstring, and similarly the error message could be updated to guide the user to resolve the issue. Perhaps we can indicate that aml_workspace argument is not used for v2 runs and we throw an exception early for guidance. Thanks.

ValueError: Tried all ways of identifying the MLClient, but failed. Please provide a workspace config file config.json or set the e nvironment variables HIML_RESOURCE_GROUP, HIML_SUBSCRIPTION_ID, and HIML_WORKSPACE_NAME.