2020from ads .common import logger
2121from ads .common .decorator .deprecate import deprecated
2222from ads .common .extended_enum import ExtendedEnum
23- from ads .config import OCI_ODSC_SERVICE_ENDPOINT
2423
2524SECURITY_TOKEN_LEFT_TIME = 600
2625
@@ -199,14 +198,7 @@ def set_auth(
199198 >>> ads.set_auth(signer_callable=signer_callable, signer_kwargs=signer_kwargs)
200199 """
201200 signer_kwargs = signer_kwargs or {}
202- client_kwargs = {
203- ** (
204- {"service_endpoint" : OCI_ODSC_SERVICE_ENDPOINT }
205- if OCI_ODSC_SERVICE_ENDPOINT
206- else {}
207- ),
208- ** (client_kwargs or {}),
209- }
201+ client_kwargs = client_kwargs or {}
210202
211203 auth_state = AuthState ()
212204
@@ -502,12 +494,6 @@ def default_signer(client_kwargs: Optional[Dict] = None) -> Dict:
502494 >>> auth = ads.auth.default_signer() # signer_callable instantiated
503495 >>> oc.OCIClientFactory(**auth).object_storage # Creates Object storage client using instance principal authentication
504496 """
505- default_client_kwargs = (
506- {"service_endpoint" : OCI_ODSC_SERVICE_ENDPOINT }
507- if OCI_ODSC_SERVICE_ENDPOINT
508- else {}
509- )
510-
511497 auth_state = AuthState ()
512498 if auth_state .oci_signer or auth_state .oci_signer_callable :
513499 configuration = ads .telemetry .update_oci_client_config (auth_state .oci_config )
@@ -519,7 +505,6 @@ def default_signer(client_kwargs: Optional[Dict] = None) -> Dict:
519505 "config" : configuration ,
520506 "signer" : signer ,
521507 "client_kwargs" : {
522- ** default_client_kwargs ,
523508 ** (auth_state .oci_client_kwargs or {}),
524509 ** (client_kwargs or {}),
525510 },
@@ -532,7 +517,6 @@ def default_signer(client_kwargs: Optional[Dict] = None) -> Dict:
532517 oci_key_profile = auth_state .oci_key_profile ,
533518 oci_config = auth_state .oci_config ,
534519 client_kwargs = {
535- ** default_client_kwargs ,
536520 ** (auth_state .oci_client_kwargs or {}),
537521 ** (client_kwargs or {}),
538522 },
0 commit comments