Skip to content

Pylint 3.3.6 updates [azure-ai-ml] #41614

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def deploy_resource(
else:
return poller
except Exception as ex:
module_logger.debug("Polling hit the exception %s\n", ex)
module_logger.debug("Polling hit the exception: %s", type(ex).__name__)
raise ex

if error is not None:
Expand Down
10 changes: 7 additions & 3 deletions sdk/ml/azure-ai-ml/azure/ai/ml/_azure_environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,15 @@ 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. "
"Error: Azure ML was unable to load cloud metadata from the metadata 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.",
"https://learn.microsoft.com/azure/machine-learning/how-to-access-azureml-behind-firewall."
)
module_logger.debug(
"Metadata url: %s. %s",
metadata_url,
ex,
)
Expand All @@ -330,7 +333,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("%s", ex)
continue
return cli_cloud_metadata_dict

Expand Down
3 changes: 2 additions & 1 deletion sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_artifact_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ def _download_artifacts(
try:
self._redirect_artifacts_tool_path(organization)
except Exception as e: # pylint: disable=W0718
_logger.warning("Redirect artifacts tool path failed, details: %s", e)
_logger.warning("Redirect artifacts tool path failed")
_logger.debug("Details: %s", e)

retries += 1
result = subprocess.run(
Expand Down
3 changes: 2 additions & 1 deletion sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,13 @@ def _from_rest_object( # pylint: disable=too-many-return-statements
raise ex
except Exception as ex:
error_message = json.dumps(obj.as_dict(), indent=2) if obj else None
module_logger.info(
module_logger.debug(
"Exception: %s.\n%s\nUnable to parse the job resource: %s.\n",
ex,
traceback.format_exc(),
error_message,
)
module_logger.info("Failed to parse job resource")
raise JobParsingError(
message=str(ex),
no_personal_data_message=f"Unable to parse a job resource of type:{type(obj).__name__}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,11 @@ def _reset_version_if_no_change(self, component: Component, current_name: str, c
)
return component.version, component._to_rest_object()
except ResourceNotFoundError as e:
logger.info("Failed to get component version, %s", e)
logger.info("Failed to get component version")
logger.debug("%s", e)
except Exception as e: # pylint: disable=W0718
logger.error("Failed to compare client_component_hash, %s", e)
logger.error("Failed to compare client_component_hash")
logger.debug("%s", e)

return current_version, rest_component_resource

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,8 @@ def resource(self) -> Any:
# duration comes in format: "PT1M56.3454108S"
module_logger.info("Total time : %s\n", from_iso_duration_format_min_sec(total_duration))
except Exception as e: # pylint: disable=W0718
module_logger.warning("Exception occurred while logging total duration: %s", e)
module_logger.warning("Exception occurred while logging total duration")
module_logger.debug("%s", e)
return self.func()

# pylint: disable=docstring-missing-param
Expand Down