Skip to content

Commit 1d778e6

Browse files
committed
Updated pr,
1 parent 10888be commit 1d778e6

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

ads/aqua/__init__.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@
2222
if not ODSC_MODEL_COMPARTMENT_OCID:
2323
try:
2424
ODSC_MODEL_COMPARTMENT_OCID = fetch_service_compartment()
25-
except Exception as e:
25+
except:
26+
pass
27+
28+
if not ODSC_MODEL_COMPARTMENT_OCID:
29+
logger.error(
30+
f"ODSC_MODEL_COMPARTMENT_OCID environment variable is not set for Aqua."
31+
)
32+
if NB_SESSION_OCID:
2633
logger.error(
27-
f"ODSC_MODEL_COMPARTMENT_OCID environment variable is not set for Aqua, due to {e}."
34+
f"Aqua is not available for this notebook session {NB_SESSION_OCID}."
2835
)
29-
if NB_SESSION_OCID:
30-
logger.error(
31-
f"Aqua is not available for this notebook session {NB_SESSION_OCID}."
32-
)
33-
exit()
36+
exit()

0 commit comments

Comments
 (0)