Skip to content

Commit 0211017

Browse files
Copilotkingernupur
andcommitted
Address review feedback: restore debug log, remove sensitive parameters from warning logs
Co-authored-by: kingernupur <[email protected]>
1 parent a5a7c3d commit 0211017

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/_arm_deployments/arm_deployment_executor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def deploy_resource(
120120
else:
121121
return poller
122122
except Exception as ex:
123+
module_logger.debug("Polling hit an exception")
123124
raise ex
124125

125126
if error is not None:

sdk/ml/azure-ai-ml/azure/ai/ml/_azure_environments.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,13 +298,12 @@ def _get_clouds_by_metadata_url(metadata_url: str) -> Dict[str, Dict[str, str]]:
298298
return cli_cloud_dict
299299
except Exception as ex: # pylint: disable=broad-except
300300
module_logger.warning(
301-
"Error: Azure ML was unable to load cloud metadata from the url specified by %s. "
301+
"Error: Azure ML was unable to load cloud metadata from the specified URL. "
302302
"This may be due to a misconfiguration of networking controls. Azure Machine Learning Python "
303303
"SDK requires outbound access to Azure Resource Manager. Please contact your networking team "
304304
"to configure outbound access to Azure Resource Manager on both Network Security Group and "
305305
"Firewall. For more details on required configurations, see "
306-
"https://learn.microsoft.com/azure/machine-learning/how-to-access-azureml-behind-firewall.",
307-
metadata_url,
306+
"https://learn.microsoft.com/azure/machine-learning/how-to-access-azureml-behind-firewall."
308307
)
309308
module_logger.debug("Exception details: %s", ex)
310309
return {}

sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,14 +334,12 @@ def _from_rest_object( # pylint: disable=too-many-return-statements
334334
raise ex
335335
except Exception as ex:
336336
error_message = json.dumps(obj.as_dict(), indent=2) if obj else None
337-
module_logger.info(
338-
"Unable to parse the job resource: %s",
339-
error_message,
340-
)
337+
module_logger.info("Unable to parse the job resource")
341338
module_logger.debug(
342-
"Exception: %s.\n%s",
339+
"Exception: %s.\n%s\nUnable to parse the job resource: %s.",
343340
ex,
344341
traceback.format_exc(),
342+
error_message,
345343
)
346344
raise JobParsingError(
347345
message=str(ex),

0 commit comments

Comments
 (0)