Skip to content

Commit 10888be

Browse files
committed
Updated error message.
1 parent c424a09 commit 10888be

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ads/aqua/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import sys
99
import os
1010
from ads.aqua.utils import fetch_service_compartment
11-
from ads.config import OCI_RESOURCE_PRINCIPAL_VERSION
11+
from ads.config import NB_SESSION_OCID, OCI_RESOURCE_PRINCIPAL_VERSION
1212
from ads import set_auth
1313

1414
logger = logging.getLogger(__name__)
@@ -26,3 +26,8 @@
2626
logger.error(
2727
f"ODSC_MODEL_COMPARTMENT_OCID environment variable is not set for Aqua, due to {e}."
2828
)
29+
if NB_SESSION_OCID:
30+
logger.error(
31+
f"Aqua is not available for this notebook session {NB_SESSION_OCID}."
32+
)
33+
exit()

0 commit comments

Comments
 (0)