Skip to content

Commit

Permalink
feat: Allow async REST support for transport override
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 686157935
  • Loading branch information
matthew29tang authored and copybara-github committed Oct 18, 2024
1 parent 3e7bf81 commit ec81eae
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions google/cloud/aiplatform/initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,14 +569,7 @@ def create_client(

# Do not pass "grpc", rely on gapic defaults unless "rest" is specified
if self._api_transport == "rest":
if "Async" in client_class.__name__:
# Warn user that "rest" is not supported and use grpc instead
logging.warning(
"REST is not supported for async clients, "
+ "falling back to grpc."
)
else:
kwargs["transport"] = self._api_transport
kwargs["transport"] = self._api_transport

client = client_class(**kwargs)
# We only wrap the client if the request_metadata is set at the creation time.
Expand Down

0 comments on commit ec81eae

Please sign in to comment.