Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] optuna depending on deprecated feature in sqlalchemy. #2562

Open
24hours opened this issue Jan 30, 2023 · 2 comments
Open

[Bug] optuna depending on deprecated feature in sqlalchemy. #2562

24hours opened this issue Jan 30, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@24hours
Copy link

24hours commented Jan 30, 2023

Optuna has updated their version to 3.1.0 due to SqlAlchemy upgrade.
optuna/optuna#4304

If installing version ~3.0.0, the follow error will occur.

self = <optuna.storages._rdb.storage._VersionManager object at 0x7f815c5d60d0>
    def get_current_version(self) -> str:
    
        context = alembic.migration.MigrationContext.configure(self.engine.connect())
        version = context.get_current_revision()
>       assert version is not None
E       AssertionError

This is because SQLAlchemy has been updated to version 2.0 and the feature is deprecated.
Hydra currently depending on version 3.0.0 will break due to the upgrade.

https://github.com/facebookresearch/hydra/blob/main/plugins/hydra_optuna_sweeper/setup.py#L32

Currently the work around is installing optuna==3.1.0.

@24hours 24hours added the bug Something isn't working label Jan 30, 2023
@leezx
Copy link

leezx commented Feb 2, 2023

or downgrade to the previous version by pip install sqlalchemy==1.4.46. This works for me.

@Jasha10
Copy link
Collaborator

Jasha10 commented Feb 8, 2023

Related to PR #2360

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants