diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py index 1ff6643f3b60..fe4f138e4607 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py @@ -24,26 +24,56 @@ from azure.ai.ml._restclient.v2020_09_01_dataplanepreview import ( AzureMachineLearningWorkspaces as ServiceClient092020DataplanePreview, ) -from azure.ai.ml._restclient.v2022_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient022022Preview -from azure.ai.ml._restclient.v2022_05_01 import AzureMachineLearningWorkspaces as ServiceClient052022 -from azure.ai.ml._restclient.v2022_10_01 import AzureMachineLearningWorkspaces as ServiceClient102022 -from azure.ai.ml._restclient.v2022_10_01_preview import AzureMachineLearningWorkspaces as ServiceClient102022Preview -from azure.ai.ml._restclient.v2023_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient022023Preview -from azure.ai.ml._restclient.v2023_04_01 import AzureMachineLearningWorkspaces as ServiceClient042023 -from azure.ai.ml._restclient.v2023_04_01_preview import AzureMachineLearningWorkspaces as ServiceClient042023Preview -from azure.ai.ml._restclient.v2023_06_01_preview import AzureMachineLearningWorkspaces as ServiceClient062023Preview -from azure.ai.ml._restclient.v2023_08_01_preview import AzureMachineLearningWorkspaces as ServiceClient082023Preview +from azure.ai.ml._restclient.v2022_02_01_preview import ( + AzureMachineLearningWorkspaces as ServiceClient022022Preview, +) +from azure.ai.ml._restclient.v2022_05_01 import ( + AzureMachineLearningWorkspaces as ServiceClient052022, +) +from azure.ai.ml._restclient.v2022_10_01 import ( + AzureMachineLearningWorkspaces as ServiceClient102022, +) +from azure.ai.ml._restclient.v2022_10_01_preview import ( + AzureMachineLearningWorkspaces as ServiceClient102022Preview, +) +from azure.ai.ml._restclient.v2023_02_01_preview import ( + AzureMachineLearningWorkspaces as ServiceClient022023Preview, +) +from azure.ai.ml._restclient.v2023_04_01 import ( + AzureMachineLearningWorkspaces as ServiceClient042023, +) +from azure.ai.ml._restclient.v2023_04_01_preview import ( + AzureMachineLearningWorkspaces as ServiceClient042023Preview, +) +from azure.ai.ml._restclient.v2023_06_01_preview import ( + AzureMachineLearningWorkspaces as ServiceClient062023Preview, +) +from azure.ai.ml._restclient.v2023_08_01_preview import ( + AzureMachineLearningWorkspaces as ServiceClient082023Preview, +) # Same object, but was renamed starting in v2023_08_01_preview from azure.ai.ml._restclient.v2023_10_01 import AzureMachineLearningServices as ServiceClient102023 -from azure.ai.ml._restclient.v2024_01_01_preview import AzureMachineLearningWorkspaces as ServiceClient012024Preview -from azure.ai.ml._restclient.v2024_04_01_preview import AzureMachineLearningWorkspaces as ServiceClient042024Preview -from azure.ai.ml._restclient.v2024_07_01_preview import AzureMachineLearningWorkspaces as ServiceClient072024Preview -from azure.ai.ml._restclient.v2024_10_01_preview import AzureMachineLearningWorkspaces as ServiceClient102024Preview +from azure.ai.ml._restclient.v2024_01_01_preview import ( + AzureMachineLearningWorkspaces as ServiceClient012024Preview, +) +from azure.ai.ml._restclient.v2024_04_01_preview import ( + AzureMachineLearningWorkspaces as ServiceClient042024Preview, +) +from azure.ai.ml._restclient.v2024_07_01_preview import ( + AzureMachineLearningWorkspaces as ServiceClient072024Preview, +) +from azure.ai.ml._restclient.v2024_10_01_preview import ( + AzureMachineLearningWorkspaces as ServiceClient102024Preview, +) from azure.ai.ml._restclient.workspace_dataplane import ( AzureMachineLearningWorkspaces as ServiceClientWorkspaceDataplane, ) -from azure.ai.ml._scope_dependent_operations import OperationConfig, OperationsContainer, OperationScope +from azure.ai.ml._scope_dependent_operations import ( + OperationConfig, + OperationsContainer, + OperationScope, +) from azure.ai.ml._telemetry.logging_handler import get_appinsights_log_handler from azure.ai.ml._user_agent import USER_AGENT from azure.ai.ml._utils._experimental import experimental @@ -102,7 +132,9 @@ from azure.ai.ml.operations._local_deployment_helper import _LocalDeploymentHelper from azure.ai.ml.operations._local_endpoint_helper import _LocalEndpointHelper from azure.ai.ml.operations._schedule_operations import ScheduleOperations -from azure.ai.ml.operations._workspace_outbound_rule_operations import WorkspaceOutboundRuleOperations +from azure.ai.ml.operations._workspace_outbound_rule_operations import ( + WorkspaceOutboundRuleOperations, +) from azure.core.credentials import TokenCredential from azure.core.polling import LROPoller @@ -250,7 +282,10 @@ def __init__( resource_group_name, subscription_id, ) = get_registry_client( - self._credential, registry_name if registry_name else registry_reference, workspace_location, **kwargs + self._credential, + registry_name if registry_name else registry_reference, + workspace_location, + **kwargs, ) if not workspace_name: workspace_name = workspace_reference @@ -586,7 +621,7 @@ def __init__( self._code = CodeOperations( self._ws_operation_scope if registry_reference else self._operation_scope, self._operation_config, - self._service_client_10_2021_dataplanepreview if registry_name else self._service_client_04_2023, + (self._service_client_10_2021_dataplanepreview if registry_name else self._service_client_04_2023), self._datastores, **ops_kwargs, # type: ignore[arg-type] ) @@ -594,7 +629,7 @@ def __init__( self._environments = EnvironmentOperations( self._ws_operation_scope if registry_reference else self._operation_scope, self._operation_config, - self._service_client_10_2021_dataplanepreview if registry_name else self._service_client_04_2023_preview, + (self._service_client_10_2021_dataplanepreview if registry_name else self._service_client_04_2023_preview), self._operation_container, **ops_kwargs, # type: ignore[arg-type] ) @@ -648,7 +683,7 @@ def __init__( self._data = DataOperations( self._operation_scope, self._operation_config, - self._service_client_10_2021_dataplanepreview if registry_name else self._service_client_04_2023_preview, + (self._service_client_10_2021_dataplanepreview if registry_name else self._service_client_04_2023_preview), self._service_client_01_2024_preview, self._datastores, requests_pipeline=self._requests_pipeline, @@ -659,7 +694,7 @@ def __init__( self._components = ComponentOperations( self._operation_scope, self._operation_config, - self._service_client_10_2021_dataplanepreview if registry_name else self._service_client_01_2024_preview, + (self._service_client_10_2021_dataplanepreview if registry_name else self._service_client_01_2024_preview), self._operation_container, self._preflight, **ops_kwargs, # type: ignore[arg-type] diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/_input_output_helpers.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/_input_output_helpers.py index a6b8f858bfc1..84e330876656 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/_input_output_helpers.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/_input_output_helpers.py @@ -6,31 +6,61 @@ import re from typing import Any, Dict, Optional, Union -from azure.ai.ml._restclient.v2023_04_01_preview.models import CustomModelJobInput as RestCustomModelJobInput -from azure.ai.ml._restclient.v2023_04_01_preview.models import CustomModelJobOutput as RestCustomModelJobOutput +from azure.ai.ml._restclient.v2023_04_01_preview.models import ( + CustomModelJobInput as RestCustomModelJobInput, +) +from azure.ai.ml._restclient.v2023_04_01_preview.models import ( + CustomModelJobOutput as RestCustomModelJobOutput, +) from azure.ai.ml._restclient.v2023_04_01_preview.models import InputDeliveryMode from azure.ai.ml._restclient.v2023_04_01_preview.models import JobInput as RestJobInput from azure.ai.ml._restclient.v2023_04_01_preview.models import JobInputType from azure.ai.ml._restclient.v2023_04_01_preview.models import JobOutput as RestJobOutput from azure.ai.ml._restclient.v2023_04_01_preview.models import JobOutputType, LiteralJobInput -from azure.ai.ml._restclient.v2023_04_01_preview.models import MLFlowModelJobInput as RestMLFlowModelJobInput -from azure.ai.ml._restclient.v2023_04_01_preview.models import MLFlowModelJobOutput as RestMLFlowModelJobOutput -from azure.ai.ml._restclient.v2023_04_01_preview.models import MLTableJobInput as RestMLTableJobInput -from azure.ai.ml._restclient.v2023_04_01_preview.models import MLTableJobOutput as RestMLTableJobOutput +from azure.ai.ml._restclient.v2023_04_01_preview.models import ( + MLFlowModelJobInput as RestMLFlowModelJobInput, +) +from azure.ai.ml._restclient.v2023_04_01_preview.models import ( + MLFlowModelJobOutput as RestMLFlowModelJobOutput, +) +from azure.ai.ml._restclient.v2023_04_01_preview.models import ( + MLTableJobInput as RestMLTableJobInput, +) +from azure.ai.ml._restclient.v2023_04_01_preview.models import ( + MLTableJobOutput as RestMLTableJobOutput, +) from azure.ai.ml._restclient.v2023_04_01_preview.models import OutputDeliveryMode -from azure.ai.ml._restclient.v2023_04_01_preview.models import TritonModelJobInput as RestTritonModelJobInput -from azure.ai.ml._restclient.v2023_04_01_preview.models import TritonModelJobOutput as RestTritonModelJobOutput -from azure.ai.ml._restclient.v2023_04_01_preview.models import UriFileJobInput as RestUriFileJobInput -from azure.ai.ml._restclient.v2023_04_01_preview.models import UriFileJobOutput as RestUriFileJobOutput -from azure.ai.ml._restclient.v2023_04_01_preview.models import UriFolderJobInput as RestUriFolderJobInput -from azure.ai.ml._restclient.v2023_04_01_preview.models import UriFolderJobOutput as RestUriFolderJobOutput +from azure.ai.ml._restclient.v2023_04_01_preview.models import ( + TritonModelJobInput as RestTritonModelJobInput, +) +from azure.ai.ml._restclient.v2023_04_01_preview.models import ( + TritonModelJobOutput as RestTritonModelJobOutput, +) +from azure.ai.ml._restclient.v2023_04_01_preview.models import ( + UriFileJobInput as RestUriFileJobInput, +) +from azure.ai.ml._restclient.v2023_04_01_preview.models import ( + UriFileJobOutput as RestUriFileJobOutput, +) +from azure.ai.ml._restclient.v2023_04_01_preview.models import ( + UriFolderJobInput as RestUriFolderJobInput, +) +from azure.ai.ml._restclient.v2023_04_01_preview.models import ( + UriFolderJobOutput as RestUriFolderJobOutput, +) from azure.ai.ml._utils.utils import is_data_binding_expression from azure.ai.ml.constants import AssetTypes, InputOutputModes, JobType from azure.ai.ml.constants._component import IOConstants from azure.ai.ml.entities._inputs_outputs import Input, Output from azure.ai.ml.entities._job.input_output_entry import InputOutputEntry from azure.ai.ml.entities._util import normalize_job_input_output_type -from azure.ai.ml.exceptions import ErrorCategory, ErrorTarget, JobException, ValidationErrorType, ValidationException +from azure.ai.ml.exceptions import ( + ErrorCategory, + ErrorTarget, + JobException, + ValidationErrorType, + ValidationException, +) INPUT_MOUNT_MAPPING_FROM_REST = { InputDeliveryMode.READ_WRITE_MOUNT: InputOutputModes.RW_MOUNT, @@ -175,7 +205,8 @@ def validate_pipeline_input_key_characters(key: str) -> None: # so a valid pipeline key is: ^{single_key}([.]{single_key})*$ if re.match(IOConstants.VALID_KEY_PATTERN, key) is None: msg = ( - "Pipeline input key name {} must be composed letters, numbers, and underscores with optional split by dots." + "Pipeline input key name {} must be composed letters, numbers, and underscores with optional " + "split by dots." ) raise ValidationException( message=msg.format(key), @@ -229,7 +260,7 @@ def to_rest_dataset_literal_inputs( if input_value.type in target_cls_dict: input_data = target_cls_dict[input_value.type]( uri=input_value.path, - mode=INPUT_MOUNT_MAPPING_TO_REST[input_value.mode.lower()] if input_value.mode else None, + mode=(INPUT_MOUNT_MAPPING_TO_REST[input_value.mode.lower()] if input_value.mode else None), ) else: @@ -292,7 +323,7 @@ def from_rest_inputs_to_dataset_literal(inputs: Dict[str, RestJobInput]) -> Dict input_data = Input( type=type_transfer_dict[input_value.job_input_type], path=path, - mode=INPUT_MOUNT_MAPPING_FROM_REST[input_value.mode] if input_value.mode else None, + mode=(INPUT_MOUNT_MAPPING_FROM_REST[input_value.mode] if input_value.mode else None), path_on_compute=sourcePathOnCompute, ) elif input_value.job_input_type in (JobInputType.LITERAL, JobInputType.LITERAL): @@ -337,7 +368,7 @@ def to_rest_data_outputs(outputs: Optional[Dict]) -> Dict[str, RestJobOutput]: asset_name=output_value.name, asset_version=output_value.version, uri=output_value.path, - mode=OUTPUT_MOUNT_MAPPING_TO_REST[output_value.mode.lower()] if output_value.mode else None, + mode=(OUTPUT_MOUNT_MAPPING_TO_REST[output_value.mode.lower()] if output_value.mode else None), pathOnCompute=getattr(output_value, "path_on_compute", None), description=output_value.description, ) @@ -380,7 +411,7 @@ def from_rest_data_outputs(outputs: Dict[str, RestJobOutput]) -> Dict[str, Outpu from_rest_outputs[output_name] = Output( type=output_type_mapping[output_value.job_output_type], path=output_value.uri, - mode=OUTPUT_MOUNT_MAPPING_FROM_REST[output_value.mode] if output_value.mode else None, + mode=(OUTPUT_MOUNT_MAPPING_FROM_REST[output_value.mode] if output_value.mode else None), path_on_compute=sourcePathOnCompute, description=output_value.description, name=output_value.asset_name, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/finetuning/custom_model_finetuning_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/finetuning/custom_model_finetuning_job.py index ad9376eb3fe6..f60a971543da 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/finetuning/custom_model_finetuning_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/finetuning/custom_model_finetuning_job.py @@ -12,7 +12,10 @@ FineTuningJob as RestFineTuningJob, JobBase as RestJobBase, ) -from azure.ai.ml.entities._job._input_output_helpers import from_rest_data_outputs, to_rest_data_outputs +from azure.ai.ml.entities._job._input_output_helpers import ( + from_rest_data_outputs, + to_rest_data_outputs, +) from azure.ai.ml.entities._inputs_outputs import Input from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY from azure.ai.ml.entities._job.finetuning.finetuning_vertical import FineTuningVertical @@ -101,7 +104,9 @@ def _to_dict(self) -> Dict: # pylint: disable=arguments-differ :return: dictionary representation of the object. :rtype: typing.Dict """ - from azure.ai.ml._schema._finetuning.custom_model_finetuning import CustomModelFineTuningSchema + from azure.ai.ml._schema._finetuning.custom_model_finetuning import ( + CustomModelFineTuningSchema, + ) schema_dict: dict = {} # TODO: Combeback to this later for FineTuningJob in pipeline @@ -196,7 +201,9 @@ def _load_from_dict( :return: CustomModelFineTuningJob object. :rtype: CustomModelFineTuningJob """ - from azure.ai.ml._schema._finetuning.custom_model_finetuning import CustomModelFineTuningSchema + from azure.ai.ml._schema._finetuning.custom_model_finetuning import ( + CustomModelFineTuningSchema, + ) # TODO: Combeback to this later - Pipeline part. # from azure.ai.ml._schema.pipeline.automl_node import AutoMLClassificationNodeSchema diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job.py index a1d68170ca59..663257a65d6c 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job.py @@ -17,10 +17,16 @@ from azure.ai.ml._restclient.v2023_04_01_preview.models import JobBase, JobService from azure.ai.ml._restclient.v2023_04_01_preview.models import JobType as RestJobType from azure.ai.ml._restclient.v2024_01_01_preview.models import JobBase as JobBase_2401 -from azure.ai.ml._restclient.v2024_01_01_preview.models import JobType as RestJobType_20240101Preview +from azure.ai.ml._restclient.v2024_01_01_preview.models import ( + JobType as RestJobType_20240101Preview, +) from azure.ai.ml._utils._html_utils import make_link, to_html from azure.ai.ml._utils.utils import dump_yaml_to_file -from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY, PARAMS_OVERRIDE_KEY, CommonYamlFields +from azure.ai.ml.constants._common import ( + BASE_PATH_CONTEXT_KEY, + PARAMS_OVERRIDE_KEY, + CommonYamlFields, +) from azure.ai.ml.constants._compute import ComputeType from azure.ai.ml.constants._job.job import JobServices, JobType from azure.ai.ml.entities._mixins import TelemetryMixin @@ -191,7 +197,10 @@ def _repr_html_(self) -> str: if self.studio_url: info.update( [ - ("Details Page", make_link(self.studio_url, "Link to Azure Machine Learning studio")), + ( + "Details Page", + make_link(self.studio_url, "Link to Azure Machine Learning studio"), + ), ] ) res: str = to_html(info) @@ -334,7 +343,10 @@ def _from_rest_object( # pylint: disable=too-many-return-statements except Exception as ex: error_message = json.dumps(obj.as_dict(), indent=2) if obj else None module_logger.info( - "Exception: %s.\n%s\nUnable to parse the job resource: %s.\n", ex, traceback.format_exc(), error_message + "Exception: %s.\n%s\nUnable to parse the job resource: %s.\n", + ex, + traceback.format_exc(), + error_message, ) raise JobParsingError( message=str(ex), diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_job_operations.py b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_job_operations.py index b986483134e6..b963a7a1a73c 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_job_operations.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_job_operations.py @@ -23,11 +23,19 @@ _resource_to_scopes, ) from azure.ai.ml._exception_helper import log_and_raise_error -from azure.ai.ml._restclient.dataset_dataplane import AzureMachineLearningWorkspaces as ServiceClientDatasetDataplane -from azure.ai.ml._restclient.model_dataplane import AzureMachineLearningWorkspaces as ServiceClientModelDataplane -from azure.ai.ml._restclient.runhistory import AzureMachineLearningWorkspaces as ServiceClientRunHistory +from azure.ai.ml._restclient.dataset_dataplane import ( + AzureMachineLearningWorkspaces as ServiceClientDatasetDataplane, +) +from azure.ai.ml._restclient.model_dataplane import ( + AzureMachineLearningWorkspaces as ServiceClientModelDataplane, +) +from azure.ai.ml._restclient.runhistory import ( + AzureMachineLearningWorkspaces as ServiceClientRunHistory, +) from azure.ai.ml._restclient.runhistory.models import Run -from azure.ai.ml._restclient.v2023_04_01_preview import AzureMachineLearningWorkspaces as ServiceClient022023Preview +from azure.ai.ml._restclient.v2023_04_01_preview import ( + AzureMachineLearningWorkspaces as ServiceClient022023Preview, +) from azure.ai.ml._restclient.v2023_04_01_preview.models import JobBase, ListViewType, UserIdentity from azure.ai.ml._restclient.v2023_08_01_preview.models import JobType as RestJobType from azure.ai.ml._restclient.v2024_01_01_preview.models import JobBase as JobBase_2401 @@ -105,7 +113,11 @@ from ._component_operations import ComponentOperations from ._compute_operations import ComputeOperations from ._dataset_dataplane_operations import DatasetDataplaneOperations -from ._job_ops_helper import get_git_properties, get_job_output_uris_from_dataplane, stream_logs_until_completion +from ._job_ops_helper import ( + get_git_properties, + get_job_output_uris_from_dataplane, + stream_logs_until_completion, +) from ._local_job_invoker import is_local_run, start_run_if_local from ._model_dataplane_operations import ModelDataplaneOperations from ._operation_orchestrator import ( @@ -207,7 +219,8 @@ def _virtual_cluster_operations(self) -> VirtualClusterOperations: return cast( VirtualClusterOperations, self._all_operations.get_operation( # type: ignore[misc] - AzureMLResourceType.VIRTUALCLUSTER, lambda x: isinstance(x, VirtualClusterOperations) + AzureMLResourceType.VIRTUALCLUSTER, + lambda x: isinstance(x, VirtualClusterOperations), ), ) @@ -387,7 +400,11 @@ def show_services(self, name: str, node_index: int = 0) -> Optional[Dict[str, Se """ service_instances_dict = self._runs_operations._operation.get_run_service_instances( - self._subscription_id, self._operation_scope.resource_group_name, self._workspace_name, name, node_index + self._subscription_id, + self._operation_scope.resource_group_name, + self._workspace_name, + name, + node_index, ) if not service_instances_dict.instances: return None @@ -513,7 +530,12 @@ def validate(self, job: Job, *, raise_on_failure: bool = False, **kwargs: Any) - @monitor_with_telemetry_mixin(ops_logger, "Job.Validate", ActivityType.INTERNALCALL) def _validate( - self, job: Job, *, raise_on_failure: bool = False, **kwargs: Any # pylint:disable=unused-argument + self, + job: Job, + *, + raise_on_failure: bool = False, + # pylint:disable=unused-argument + **kwargs: Any, ) -> ValidationResult: """Implementation of validate. @@ -831,7 +853,10 @@ def stream(self, name: str) -> None: raise PipelineChildJobError(job_id=job_object.id) self._stream_logs_until_completion( - self._runs_operations, job_object, self._datastore_operations, requests_pipeline=self._requests_pipeline + self._runs_operations, + job_object, + self._datastore_operations, + requests_pipeline=self._requests_pipeline, ) @distributed_trace @@ -876,7 +901,11 @@ def download( ): reused_job_name = job_details.properties[PipelineConstants.REUSED_JOB_ID] reused_job_detail = self.get(reused_job_name) - module_logger.info("job %s reuses previous job %s, download from the reused job.", name, reused_job_name) + module_logger.info( + "job %s reuses previous job %s, download from the reused job.", + name, + reused_job_name, + ) name, job_details = reused_job_name, reused_job_detail job_status = job_details.status if job_status not in RunHistoryConstants.TERMINAL_STATUSES: @@ -901,7 +930,10 @@ def download( def log_missing_uri(what: str) -> None: module_logger.debug( - 'Could not download %s for job "%s" (job status: %s)', what, job_details.name, job_details.status + 'Could not download %s for job "%s" (job status: %s)', + what, + job_details.name, + job_details.status, ) if isinstance(job_details, SweepJob): @@ -1068,7 +1100,8 @@ def _get_workspace_url(self, url_key: WorkspaceDiscoveryUrlKey) -> str: ) all_urls = json.loads( download_text_from_url( - discovery_url, create_requests_pipeline_with_retry(requests_pipeline=self._requests_pipeline) + discovery_url, + create_requests_pipeline_with_retry(requests_pipeline=self._requests_pipeline), ) ) return all_urls[url_key]