Skip to content

Commit

Permalink
fix endpoint of pai-eas vpc network
Browse files Browse the repository at this point in the history
  • Loading branch information
pitt-liang committed Aug 16, 2024
1 parent c4bece7 commit 690916f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pai/api/client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ def get_endpoint(
raise ValueError("Please provide region_id to get the endpoint.")

if network and network != Network.PUBLIC:
subdomain = f"{service_name}-{network.value.lower()}"
if service_name == "pai-eas":
# see endpoint list provided by PAI-EAS
# https://next.api.aliyun.com/product/eas
subdomain = f"pai-eas-manage-{network.value.lower()}"
else:
subdomain = f"{service_name}-{network.value.lower()}"
else:
subdomain = service_name
return DEFAULT_SERVICE_ENDPOINT_PATTERN.format(subdomain, region_id)

0 comments on commit 690916f

Please sign in to comment.