From a45aa678b3a4ff853c2ae0e60b4437770d5fec7b Mon Sep 17 00:00:00 2001 From: Lu Peng Date: Thu, 7 Nov 2024 16:42:21 -0500 Subject: [PATCH] Improved compability check error handling. --- ads/aqua/common/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ads/aqua/common/utils.py b/ads/aqua/common/utils.py index 7a0d9d46b..569dd2923 100644 --- a/ads/aqua/common/utils.py +++ b/ads/aqua/common/utils.py @@ -5,6 +5,7 @@ import asyncio import base64 +import concurrent.futures import json import logging import os @@ -615,6 +616,12 @@ def fetch_service_compartment() -> Union[str, None]: file_path=config_file_name, config_file_name=CONTAINER_INDEX, ) + except concurrent.futures.TimeoutError: + logger.debug( + "If you are using custom networking in your notebook session, " + "please check if the subnet has service gateway configured." + ) + return except Exception as e: logger.debug( f"Config file {config_file_name}/{CONTAINER_INDEX} to fetch service compartment OCID "