question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Import AxClient fails if SQLAlchemy not installed

See original GitHub issue

Importing AxClient fails if environment doesn’t have SQLAlchemy installed. Not sure if this the intended behaviour as it seems that SQLAlchemy is an optional dependency.

Easy to fix for me, as I was planning to use SQLAlchemy to store state either way, but just wanted to make sure this was properly notified 😄

Python version: 3.7.4 Ax version: 0.1.6 Logs:

>>> from ax.service.ax_client import AxClient
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/temp/.local/share/virtualenvs/local_ipynb-rHeTa3va/lib/python3.7/site-packages/ax/service/ax_client.py", line 36, in <module>
    from ax.service.utils.storage import (
  File "/Users/temp/.local/share/virtualenvs/local_ipynb-rHeTa3va/lib/python3.7/site-packages/ax/service/utils/storage.py", line 8, in <module>
    from ax.storage.sqa_store.db import init_engine_and_session_factory
  File "/Users/temp/.local/share/virtualenvs/local_ipynb-rHeTa3va/lib/python3.7/site-packages/ax/storage/sqa_store/__init__.py", line 6, in <module>
    from ax.storage.sqa_store import validation
  File "/Users/temp/.local/share/virtualenvs/local_ipynb-rHeTa3va/lib/python3.7/site-packages/ax/storage/sqa_store/validation.py", line 6, in <module>
    from ax.storage.sqa_store.db import SQABase
  File "/Users/temp/.local/share/virtualenvs/local_ipynb-rHeTa3va/lib/python3.7/site-packages/ax/storage/sqa_store/db.py", line 14, in <module>
    from sqlalchemy import create_engine, inspect
ModuleNotFoundError: No module named 'sqlalchemy'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
casassgcommented, Dec 3, 2019

Is there any update on the release? SQLAlchemy is currently blocking us due to a dependency issue we have.

Per https://github.com/facebook/Ax/pull/216#issuecomment-561285577 I guess the travis fix is going first?

1reaction
lena-kashtelyancommented, Nov 5, 2019

@casassg, we don’t actually have a release schedule per se; I’ll see if we can cut a release by next week though : )

Read more comments on GitHub >

github_iconTop Results From Across the Web

Import AxClient fails if SQLAlchemy not installed #662 - GitHub
This seems to only happen on the latest version of ax (0.2.1) released earlier this week. $ pip show ax-platform Name: ax-platform Version:...
Read more >
ImportError: No module named sqlalchemy - Stack Overflow
just adding an error I was having. I was using virtualenv and encountering this problem. Running pip install Flask-SQLAlchemy without sudo was ...
Read more >
ax.service.ax_client - Adaptive Experimentation Platform
If not set, one is intelligently chosen based on properties of search space. ... SQLAlchemy " "installed in your environment (can be installed...
Read more >
ray.tune.search.ax.ax_search — Ray 3.0.0.dev0
To use this search algorithm, you must install Ax and sqlalchemy: ... **ax_kwargs: Passed to AxClient instance. Ignored if `AxClient` is not None....
Read more >
No module named 'sqlalchemy' in Python | bobbyhadz
The Python "ModuleNotFoundError: No module named 'sqlalchemy'" occurs when we forget to install the SQLAlchemy module before importing it or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found