optuna.storages.run_grpc_proxy_server
- optuna.storages.run_grpc_proxy_server(storage, *, host='localhost', port=13000, thread_pool=None)[source]
Run a gRPC server for the given storage URL, host, and port.
Example
Run this server with the following way:
from optuna.storages import run_grpc_proxy_server from optuna.storages import get_storage storage = get_storage("mysql+pymysql://<user>:<pass>@<host>/<dbname>[?<options>]") run_grpc_proxy_server(storage, host="localhost", port=13000)
Please refer to the client class
GrpcStorageProxy
for the client usage. Please useget_storage()
instead ofRDBStorage
sinceRDBStorage
by itself does not use cache in process and it may cause significant slowdown.- Parameters:
- Return type:
None
Note
Added in v4.2.0 as an experimental feature. The interface may change in newer versions without prior notice. See https://github.com/optuna/optuna/releases/tag/v4.2.0.