Torch | TypeError: Cannot create a consistent method resolution order (MRO) for bases Callback

0 minute read

Error

TypeError: Cannot create a consistent method resolution order (MRO) for bases Callback, PyTorchLightningPruningCallback
This error happened when I executed following code:
from pytorch_forecasting.models.temporal_fusion_transformer.tuning import optimize_hyperparameters

Env

torch==2.0.1
pytorch-forecasting==1.0.0
pytorch-lightning==2.0.2
Python==3.10.11

Solution

Found a solution from github. Degrade optuna to 3.4.0 and it worked.



More
Use WeightedRandomSampler

comments powered by Disqus