5.1 Configure Pooled Connections for AutoML
AutoML operations require a pooled database connection. To enable pooled
connections, add pooled service entries to the tnsnames.ora file included
in the Oracle wallet used by the container.
Add a Pooled Connection Entry
Locate the existing service entry in tnsnames.ora and
add a corresponding pooled entry., such as myadb_medium_pool.
The required configuration change is the addition of: SERVER=POOLED)
inside the connect_data section of the service entry.
The following example shows the pooled services entry that can be added
to the tnsnames.ora file:
myadb_low_pool = (description= (retry_count=20)(retry_delay=3)(address=(https_proxy=your proxy address here)(https_proxy_port=80)(protocol=tcps)(port=1522)(host=adb.us-sanjose-1.oraclecloud.com))(connect_data=(service_name=qtraya2braestch_myadb_medium.adb.oraclecloud.com)(SERVER=POOLED))(security=(ssl_server_cert_dn="CN=adb.us-sanjose-1.oraclecloud.com,OU=Oracle ADB SANJOSE,O=Oracle Corporation,L=Redwood City,ST=California,C=US")))myadb_medium_pool = (description= (retry_count=20)(retry_delay=3)(address=(https_proxy=your proxy address here)(https_proxy_port=80)(protocol=tcps)(port=1522)(host=adb.us-sanjose-1.oraclecloud.com))(connect_data=(service_name=qtraya2braestch_myadb_medium.adb.oraclecloud.com)(SERVER=POOLED))(security=(ssl_server_cert_dn="CN=adb.us-sanjose-1.oraclecloud.com,OU=Oracle ADB SANJOSE,O=Oracle Corporation,L=Redwood City,ST=California,C=US")))myadb_high_pool = (description= (retry_count=20)(retry_delay=3)(address=(https_proxy=your proxy address here)(https_proxy_port=80)(protocol=tcps)(port=1522)(host=adb.us-sanjose-1.oraclecloud.com))(connect_data=(service_name=qtraya2braestch_myadb_medium.adb.oraclecloud.com)(SERVER=POOLED))(security=(ssl_server_cert_dn="CN=adb.us-sanjose-1.oraclecloud.com,OU=Oracle ADB SANJOSE,O=Oracle Corporation,L=Redwood City,ST=California,C=US")))
Replace the service names with the Autonomous AI Database service names used in your environment.
Connect Using AutoML
When connecting through OML4Py, specify:
- the standard database service using the
dsnparameter, and - the pooled service using the
automlparameter.
For example:
oml.connect(
user="<user>",
password="<password>",
dsn="myadb_medium",
automl="myadb_medium_pool"
)
In this example:
dsnspecifies the standard database service.automlspecifies the pooled service used for AutoML operations.
Parent topic: Install OML4Py Client Container