Skip to content

Commit 85561af

Browse files
committed
Fixed CI/CD error
1 parent a4d9c5b commit 85561af

File tree

1 file changed

+5
-5
lines changed
  • metadata-ingestion/src/datahub/ingestion/source

1 file changed

+5
-5
lines changed

metadata-ingestion/src/datahub/ingestion/source/vertexai.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import dataclasses
22
import logging
33
from datetime import datetime
4-
from typing import Any, Iterable, List, Optional, TypeVar
4+
from typing import Any, Dict, Iterable, List, Optional, TypeVar
55

66
from google.api_core.exceptions import GoogleAPICallError
77
from google.cloud import aiplatform
@@ -140,8 +140,8 @@ def __init__(self, ctx: PipelineContext, config: VertexAIConfig):
140140
project=config.project_id, location=config.region, credentials=credentials
141141
)
142142
self.client = aiplatform
143-
self.endpoints: Optional[dict[str, List[Endpoint]]] = None
144-
self.datasets: Optional[dict[str, VertexAiResourceNoun]] = None
143+
self.endpoints: Optional[Dict[str, List[Endpoint]]] = None
144+
self.datasets: Optional[Dict[str, VertexAiResourceNoun]] = None
145145

146146
def get_report(self) -> SourceReport:
147147
return self.report
@@ -395,7 +395,7 @@ def _search_dataset(self, dataset_id: str) -> Optional[VertexAiResourceNoun]:
395395
]
396396

397397
if self.datasets is None:
398-
self.datasets = dict[str, VertexAiResourceNoun]()
398+
self.datasets: Dict[str, VertexAiResourceNoun] = {}
399399

400400
for dtype in dataset_types:
401401
dataset_class = getattr(self.client.datasets, dtype)
@@ -633,7 +633,7 @@ def _search_endpoint(self, model: Model) -> List[Endpoint]:
633633
Search for an endpoint associated with the model.
634634
"""
635635
if self.endpoints is None:
636-
endpoint_dict = dict[str, List[Endpoint]]()
636+
endpoint_dict:Dict[str, List[Endpoint]] = {}
637637
for endpoint in self.client.Endpoint.list():
638638
for resource in endpoint.list_models():
639639
if resource.model not in endpoint_dict:

0 commit comments

Comments
 (0)