-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Expected behavior
I am getting a runtime error. eg:
Running python3 -c 'import optuna; print(f"- Optuna version:{optuna.__version__}")' is resulting in runtime error.
Running the first basic example is resulting in runtime error.
Environment
- Optuna version: 4.2.0
- Python version: 3.12.8
- OS: Ubuntu 24.04.1 LTS (and also Windows 11)
Error messages, stack traces, or logs
RuntimeError: The grpc package installed is at version 1.67.1, but the generated code in api_pb2_grpc.py depends on grpcio>=1.68.1. Please upgrade your grpc module to grpcio>=1.68.1 or downgrade your generated code using grpcio-tools<=1.67.1.Steps to reproduce
- Using a conda-forge install of optuna and tensorboard
mamba install optuna tensorboard -c conda-forge python -c 'import optuna; optuna.__version__'(for example).
Additional context (optional)
After install, grpcio is version 1.67.1. But optuna wants >=1.68.1 according to here. I see this is auto generated by grpcio but when or where is beyond me.
Seems to be a problem specifically with tensorboard keeping grpcio version below at 1.67.1. Installing optuna on its own is fine and as per error message, a pip install also fixes, ie pip install grpcio==1.70.0.
I note that the conda-forge version of grpcio is at version 1.67.1 only.
So more of a conda annoyance than a bug. Also time to stop using tensorboard. but I hope still useful.