-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Fix pylint C4766 and C4762 errors in azure-ai-ml for version 3.3.6 #41663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cfbc42e
eaaf8bd
a5a7c3d
0211017
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -298,15 +298,14 @@ def _get_clouds_by_metadata_url(metadata_url: str) -> Dict[str, Dict[str, str]]: | |
| return cli_cloud_dict | ||
| except Exception as ex: # pylint: disable=broad-except | ||
| module_logger.warning( | ||
| "Error: Azure ML was unable to load cloud metadata from the url specified by %s. %s. " | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is fixed yet. It still has a parameter that needs to be removed.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in commit 0211017. Removed the metadata_url parameter from the warning message as it may contain sensitive information. |
||
| "Error: Azure ML was unable to load cloud metadata from the specified URL. " | ||
| "This may be due to a misconfiguration of networking controls. Azure Machine Learning Python " | ||
| "SDK requires outbound access to Azure Resource Manager. Please contact your networking team " | ||
| "to configure outbound access to Azure Resource Manager on both Network Security Group and " | ||
| "Firewall. For more details on required configurations, see " | ||
| "https://learn.microsoft.com/azure/machine-learning/how-to-access-azureml-behind-firewall.", | ||
| metadata_url, | ||
| ex, | ||
| "https://learn.microsoft.com/azure/machine-learning/how-to-access-azureml-behind-firewall." | ||
| ) | ||
| module_logger.debug("Exception details: %s", ex) | ||
| return {} | ||
|
|
||
|
|
||
|
|
@@ -330,7 +329,8 @@ def _convert_arm_to_cli(arm_cloud_metadata) -> Dict[str, Dict[str, str]]: | |
| EndpointURLS.REGISTRY_DISCOVERY_ENDPOINT: registry_discovery_url, | ||
| } | ||
| except KeyError as ex: | ||
| module_logger.warning("Property on cloud not found in arm cloud metadata: %s", ex) | ||
| module_logger.warning("Property on cloud not found in arm cloud metadata") | ||
| module_logger.debug("Missing property: %s", ex) | ||
| continue | ||
| return cli_cloud_metadata_dict | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not remove this log. Change the message to fix the pylint error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 0211017. Restored the debug log but removed the exception parameter from the message to comply with the pylint rule.