10
10
from functools import singledispatch
11
11
from itertools import product
12
12
from pathlib import Path
13
- from typing import Any , Optional , Tuple , TypeVar , Union
13
+ from typing import Any , Dict , Optional , Tuple , TypeVar , Union
14
14
15
15
from azure .ai .ml ._azure_environments import (
16
16
CloudArgumentKeys ,
@@ -269,12 +269,12 @@ def __init__(
269
269
270
270
user_agent = kwargs .get ("user_agent" , None )
271
271
272
- app_insights_handler = get_appinsights_log_handler (
272
+ app_insights_handler : Tuple = get_appinsights_log_handler (
273
273
user_agent ,
274
274
** {"properties" : properties },
275
275
enable_telemetry = self ._operation_config .enable_telemetry ,
276
276
)
277
- app_insights_handler_kwargs = {"app_insights_handler" : app_insights_handler }
277
+ app_insights_handler_kwargs : Dict [ str , Tuple ] = {"app_insights_handler" : app_insights_handler }
278
278
279
279
base_url = _get_base_url_from_metadata (cloud_name = cloud_name , is_local_mfe = True )
280
280
self ._base_url = base_url
@@ -442,7 +442,7 @@ def __init__(
442
442
self ._service_client_10_2022_preview ,
443
443
self ._operation_container ,
444
444
self ._credential ,
445
- ** app_insights_handler_kwargs ,
445
+ ** app_insights_handler_kwargs , # type: ignore[arg-type]
446
446
)
447
447
self ._operation_container .add (AzureMLResourceType .REGISTRY , self ._registries ) # type: ignore[arg-type]
448
448
@@ -463,15 +463,15 @@ def __init__(
463
463
self ._operation_scope ,
464
464
self ._operation_config ,
465
465
self ._service_client_08_2023_preview ,
466
- ** app_insights_handler_kwargs ,
466
+ ** app_insights_handler_kwargs , # type: ignore[arg-type]
467
467
)
468
468
self ._operation_container .add (AzureMLResourceType .COMPUTE , self ._compute )
469
469
self ._datastores = DatastoreOperations (
470
470
operation_scope = self ._operation_scope ,
471
471
operation_config = self ._operation_config ,
472
472
serviceclient_2023_04_01_preview = self ._service_client_04_2023_preview ,
473
473
serviceclient_2024_01_01_preview = self ._service_client_01_2024_preview ,
474
- ** ops_kwargs ,
474
+ ** ops_kwargs , # type: ignore[arg-type]
475
475
)
476
476
self ._operation_container .add (AzureMLResourceType .DATASTORE , self ._datastores )
477
477
self ._models = ModelOperations (
@@ -487,23 +487,23 @@ def __init__(
487
487
workspace_rg = self ._ws_rg ,
488
488
workspace_sub = self ._ws_sub ,
489
489
registry_reference = registry_reference ,
490
- ** app_insights_handler_kwargs ,
490
+ ** app_insights_handler_kwargs , # type: ignore[arg-type]
491
491
)
492
492
self ._operation_container .add (AzureMLResourceType .MODEL , self ._models )
493
493
self ._code = CodeOperations (
494
494
self ._ws_operation_scope if registry_reference else self ._operation_scope ,
495
495
self ._operation_config ,
496
496
self ._service_client_10_2021_dataplanepreview if registry_name else self ._service_client_04_2023 ,
497
497
self ._datastores ,
498
- ** ops_kwargs ,
498
+ ** ops_kwargs , # type: ignore[arg-type]
499
499
)
500
500
self ._operation_container .add (AzureMLResourceType .CODE , self ._code )
501
501
self ._environments = EnvironmentOperations (
502
502
self ._ws_operation_scope if registry_reference else self ._operation_scope ,
503
503
self ._operation_config ,
504
504
self ._service_client_10_2021_dataplanepreview if registry_name else self ._service_client_04_2023_preview ,
505
505
self ._operation_container ,
506
- ** ops_kwargs ,
506
+ ** ops_kwargs , # type: ignore[arg-type]
507
507
)
508
508
self ._operation_container .add (AzureMLResourceType .ENVIRONMENT , self ._environments )
509
509
self ._local_endpoint_helper = _LocalEndpointHelper (requests_pipeline = self ._requests_pipeline )
@@ -516,7 +516,7 @@ def __init__(
516
516
self ._local_endpoint_helper ,
517
517
self ._credential ,
518
518
requests_pipeline = self ._requests_pipeline ,
519
- ** ops_kwargs ,
519
+ ** ops_kwargs , # type: ignore[arg-type]
520
520
)
521
521
self ._batch_endpoints = BatchEndpointOperations (
522
522
self ._operation_scope ,
@@ -526,7 +526,7 @@ def __init__(
526
526
self ._credential ,
527
527
requests_pipeline = self ._requests_pipeline ,
528
528
service_client_09_2020_dataplanepreview = self ._service_client_09_2020_dataplanepreview ,
529
- ** ops_kwargs ,
529
+ ** ops_kwargs , # type: ignore[arg-type]
530
530
)
531
531
self ._operation_container .add (AzureMLResourceType .BATCH_ENDPOINT , self ._batch_endpoints )
532
532
self ._operation_container .add (AzureMLResourceType .ONLINE_ENDPOINT , self ._online_endpoints )
@@ -537,7 +537,7 @@ def __init__(
537
537
self ._operation_container ,
538
538
self ._local_deployment_helper ,
539
539
self ._credential ,
540
- ** ops_kwargs ,
540
+ ** ops_kwargs , # type: ignore[arg-type]
541
541
)
542
542
self ._batch_deployments = BatchDeploymentOperations (
543
543
self ._operation_scope ,
@@ -569,7 +569,7 @@ def __init__(
569
569
self ._service_client_10_2021_dataplanepreview if registry_name else self ._service_client_10_2022 ,
570
570
self ._operation_container ,
571
571
self ._preflight ,
572
- ** ops_kwargs ,
572
+ ** ops_kwargs , # type: ignore[arg-type]
573
573
)
574
574
self ._operation_container .add (AzureMLResourceType .COMPONENT , self ._components )
575
575
self ._jobs = JobOperations (
@@ -602,7 +602,7 @@ def __init__(
602
602
self ._operation_scope ,
603
603
self ._credential ,
604
604
_service_client_kwargs = kwargs ,
605
- ** ops_kwargs ,
605
+ ** ops_kwargs , # type: ignore[arg-type]
606
606
)
607
607
self ._operation_container .add (
608
608
AzureMLResourceType .VIRTUALCLUSTER , self ._virtual_clusters # type: ignore[arg-type]
@@ -615,7 +615,7 @@ def __init__(
615
615
self ._service_client_08_2023_preview ,
616
616
self ._operation_container ,
617
617
self ._credential ,
618
- ** app_insights_handler_kwargs ,
618
+ ** app_insights_handler_kwargs , # type: ignore[arg-type]
619
619
)
620
620
621
621
self ._featuresets = FeatureSetOperations (
@@ -624,22 +624,22 @@ def __init__(
624
624
self ._service_client_10_2023 ,
625
625
self ._service_client_08_2023_preview ,
626
626
self ._datastores ,
627
- ** ops_kwargs ,
627
+ ** ops_kwargs , # type: ignore[arg-type]
628
628
)
629
629
630
630
self ._featurestoreentities = FeatureStoreEntityOperations (
631
631
self ._operation_scope ,
632
632
self ._operation_config ,
633
633
self ._service_client_10_2023 ,
634
- ** ops_kwargs ,
634
+ ** ops_kwargs , # type: ignore[arg-type]
635
635
)
636
636
637
637
self ._workspace_hubs = WorkspaceHubOperations (
638
638
self ._operation_scope ,
639
639
self ._service_client_08_2023_preview ,
640
640
self ._operation_container ,
641
641
self ._credential ,
642
- ** app_insights_handler_kwargs ,
642
+ ** app_insights_handler_kwargs , # type: ignore[arg-type]
643
643
)
644
644
self ._operation_container .add (AzureMLResourceType .WORKSPACE_HUB , self ._workspace_hubs ) # type: ignore[arg-type]
645
645
0 commit comments