jcmgray / cotengra

Hyper optimized contraction trees for large tensor networks and einsums
https://cotengra.readthedocs.io
Apache License 2.0
174 stars 32 forks source link

Optuna depreciation warnings: `suggest_loguniform` #16

Closed lm1909 closed 1 year ago

lm1909 commented 1 year ago

Optuna seems to have deprecated a couple of features in v3.0.0, which results in warnings like .../cotengra/hyper_optuna.py:21: FutureWarning: suggest_loguniform has been deprecated in v3.0.0. This feature will be removed in v6.0.0. See https://github.com/optuna/optuna/releases/tag/v3.0.0. Use :func:`~optuna.trial.Trial.suggest_float` instead. caused by this: https://github.com/jcmgray/cotengra/blob/718b0bd3a9c80bdac74ddeb922055c5bcf1a5b71/cotengra/hyper_optuna.py#L21

alex-orca commented 1 year ago

I am also getting the above warning accompanied another one for the deprecation of suggest_uniform : cotengra/hyper_optuna.py:18: FutureWarning: suggest_uniform has been deprecated in v3.0.0. This feature will be removed in v6.0.0. See https://github.com/optuna/optuna/releases/tag/v3.0.0. Use :func:~optuna.trial.Trial.suggest_floatinstead.

jcmgray commented 1 year ago

Thanks for the issue, looks like it's simply a matter of changing suggest_float(log={False|True}) instead (which I presume has been available for a number of version). I should get to it soon, unless anyone wants to submit a PR first!

jcmgray commented 1 year ago

This should be fixed by https://github.com/jcmgray/cotengra/commit/2d8b6b406b34fe63c91362e46966dd589d9cddad.

alex-orca commented 1 year ago

Thank you for solving this!