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
@@ -463,7 +463,7 @@ def __init__(
463
463
self ._service_client_10_2022_preview ,
464
464
self ._operation_container ,
465
465
self ._credential ,
466
- ** app_insights_handler_kwargs ,
466
+ ** app_insights_handler_kwargs , # type: ignore[arg-type]
467
467
)
468
468
self ._operation_container .add (AzureMLResourceType .REGISTRY , self ._registries ) # type: ignore[arg-type]
469
469
@@ -484,15 +484,15 @@ def __init__(
484
484
self ._operation_scope ,
485
485
self ._operation_config ,
486
486
self ._service_client_08_2023_preview ,
487
- ** app_insights_handler_kwargs ,
487
+ ** app_insights_handler_kwargs , # type: ignore[arg-type]
488
488
)
489
489
self ._operation_container .add (AzureMLResourceType .COMPUTE , self ._compute )
490
490
self ._datastores = DatastoreOperations (
491
491
operation_scope = self ._operation_scope ,
492
492
operation_config = self ._operation_config ,
493
493
serviceclient_2023_04_01_preview = self ._service_client_04_2023_preview ,
494
494
serviceclient_2024_01_01_preview = self ._service_client_01_2024_preview ,
495
- ** ops_kwargs ,
495
+ ** ops_kwargs , # type: ignore[arg-type]
496
496
)
497
497
self ._operation_container .add (AzureMLResourceType .DATASTORE , self ._datastores )
498
498
self ._models = ModelOperations (
@@ -510,23 +510,23 @@ def __init__(
510
510
workspace_rg = self ._ws_rg ,
511
511
workspace_sub = self ._ws_sub ,
512
512
registry_reference = registry_reference ,
513
- ** app_insights_handler_kwargs ,
513
+ ** app_insights_handler_kwargs , # type: ignore[arg-type]
514
514
)
515
515
self ._operation_container .add (AzureMLResourceType .MODEL , self ._models )
516
516
self ._code = CodeOperations (
517
517
self ._ws_operation_scope if registry_reference else self ._operation_scope ,
518
518
self ._operation_config ,
519
519
self ._service_client_10_2021_dataplanepreview if registry_name else self ._service_client_04_2023 ,
520
520
self ._datastores ,
521
- ** ops_kwargs ,
521
+ ** ops_kwargs , # type: ignore[arg-type]
522
522
)
523
523
self ._operation_container .add (AzureMLResourceType .CODE , self ._code )
524
524
self ._environments = EnvironmentOperations (
525
525
self ._ws_operation_scope if registry_reference else self ._operation_scope ,
526
526
self ._operation_config ,
527
527
self ._service_client_10_2021_dataplanepreview if registry_name else self ._service_client_04_2023_preview ,
528
528
self ._operation_container ,
529
- ** ops_kwargs ,
529
+ ** ops_kwargs , # type: ignore[arg-type]
530
530
)
531
531
self ._operation_container .add (AzureMLResourceType .ENVIRONMENT , self ._environments )
532
532
self ._local_endpoint_helper = _LocalEndpointHelper (requests_pipeline = self ._requests_pipeline )
@@ -539,7 +539,7 @@ def __init__(
539
539
self ._local_endpoint_helper ,
540
540
self ._credential ,
541
541
requests_pipeline = self ._requests_pipeline ,
542
- ** ops_kwargs ,
542
+ ** ops_kwargs , # type: ignore[arg-type]
543
543
)
544
544
self ._batch_endpoints = BatchEndpointOperations (
545
545
self ._operation_scope ,
@@ -549,7 +549,7 @@ def __init__(
549
549
self ._credential ,
550
550
requests_pipeline = self ._requests_pipeline ,
551
551
service_client_09_2020_dataplanepreview = self ._service_client_09_2020_dataplanepreview ,
552
- ** ops_kwargs ,
552
+ ** ops_kwargs , # type: ignore[arg-type]
553
553
)
554
554
self ._operation_container .add (AzureMLResourceType .BATCH_ENDPOINT , self ._batch_endpoints )
555
555
self ._operation_container .add (AzureMLResourceType .ONLINE_ENDPOINT , self ._online_endpoints )
@@ -560,7 +560,7 @@ def __init__(
560
560
self ._operation_container ,
561
561
self ._local_deployment_helper ,
562
562
self ._credential ,
563
- ** ops_kwargs ,
563
+ ** ops_kwargs , # type: ignore[arg-type]
564
564
)
565
565
self ._batch_deployments = BatchDeploymentOperations (
566
566
self ._operation_scope ,
@@ -592,7 +592,7 @@ def __init__(
592
592
self ._service_client_10_2021_dataplanepreview if registry_name else self ._service_client_01_2024_preview ,
593
593
self ._operation_container ,
594
594
self ._preflight ,
595
- ** ops_kwargs ,
595
+ ** ops_kwargs , # type: ignore[arg-type]
596
596
)
597
597
self ._operation_container .add (AzureMLResourceType .COMPONENT , self ._components )
598
598
self ._jobs = JobOperations (
@@ -626,7 +626,7 @@ def __init__(
626
626
self ._operation_scope ,
627
627
self ._credential ,
628
628
_service_client_kwargs = kwargs ,
629
- ** ops_kwargs ,
629
+ ** ops_kwargs , # type: ignore[arg-type]
630
630
)
631
631
self ._operation_container .add (
632
632
AzureMLResourceType .VIRTUALCLUSTER , self ._virtual_clusters # type: ignore[arg-type]
@@ -639,7 +639,7 @@ def __init__(
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
645
645
self ._featuresets = FeatureSetOperations (
@@ -648,22 +648,22 @@ def __init__(
648
648
self ._service_client_10_2023 ,
649
649
self ._service_client_08_2023_preview ,
650
650
self ._datastores ,
651
- ** ops_kwargs ,
651
+ ** ops_kwargs , # type: ignore[arg-type]
652
652
)
653
653
654
654
self ._featurestoreentities = FeatureStoreEntityOperations (
655
655
self ._operation_scope ,
656
656
self ._operation_config ,
657
657
self ._service_client_10_2023 ,
658
- ** ops_kwargs ,
658
+ ** ops_kwargs , # type: ignore[arg-type]
659
659
)
660
660
661
661
self ._workspace_hubs = WorkspaceHubOperations (
662
662
self ._operation_scope ,
663
663
self ._service_client_08_2023_preview ,
664
664
self ._operation_container ,
665
665
self ._credential ,
666
- ** app_insights_handler_kwargs ,
666
+ ** app_insights_handler_kwargs , # type: ignore[arg-type]
667
667
)
668
668
self ._operation_container .add (AzureMLResourceType .WORKSPACE_HUB , self ._workspace_hubs ) # type: ignore[arg-type]
669
669
0 commit comments