You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to follow these steps on this tutorial
from ax.storage.sqa_store.structs import DBSettings
# URL is of the form "dialect+driver://username:password@host:port/database".
db_settings = DBSettings(url="postgresql+psycopg2://sarah:c82i94d@ocalhost:5432/foobar")
# Instead of URL, can provide a `creator function`; can specify custom encoders/decoders if necessary.
new_ax = AxClient(db_settings=db_settings)
While getting these error:
TypeError Traceback (most recent call last)
<ipython-input-15-7fbaa4d2b122> in <module>
1 # sql settings
2 db_settings = DBSettings(url='postgresql+psycopg2://li:***@***:5432/test')
----> 3 ax_client = AxClient(enforce_sequential_optimization=False, db_settings=db_settings)
4 ax_client.create_experiment(name='test')
5 init_notebook_plotting()
~\miniconda3\envs\ax\lib\site-packages\ax\service\ax_client.py in __init__(self, generation_strategy, db_settings, enforce_sequential_optimization, random_seed, verbose_logging, suppress_storage_errors)
132 suppress_storage_errors: bool = False,
133 ) -> None:
--> 134 super().__init__(db_settings=db_settings)
135 if not verbose_logging:
136 logger.setLevel(logging.WARNING) # pragma: no cover
~\miniconda3\envs\ax\lib\site-packages\ax\service\utils\with_db_settings_base.py in __init__(self, db_settings, logging_level)
67 self._db_settings = db_settings
68 if self.db_settings_set:
---> 69 init_engine_and_session_factory(
70 creator=self.db_settings.creator, url=self.db_settings.url
71 )
~\miniconda3\envs\ax\lib\site-packages\ax\storage\sqa_store\db.py in init_engine_and_session_factory(url, creator, echo, force_init, **kwargs)
338 return # pragma: no cover
339 if url is not None:
--> 340 engine = create_mysql_engine_from_url(url=url, echo=echo, **kwargs)
341 elif creator is not None:
342 engine = create_mysql_engine_from_creator(creator=creator, echo=echo, **kwargs)
~\miniconda3\envs\ax\lib\site-packages\ax\storage\sqa_store\db.py in create_mysql_engine_from_url(url, echo, pool_recycle, **kwargs)
278
279 """
--> 280 return create_engine(
281 name_or_url=url, pool_recycle=pool_recycle, echo=echo, **kwargs
282 )
TypeError: create_engine() missing 1 required positional argument: 'url'
I can connect the SQL server with pgAdmin with exactly the same info.
I'd appreciate it if anyone could advice on this.
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Hi @rzc331 ! This has been fixed in cb9112b. You can either patch that commit locally, or wait until our next release, which should be within the next week or so.
Hi, I am trying to follow these steps on this tutorial
While getting these error:
I can connect the SQL server with pgAdmin with exactly the same info.
I'd appreciate it if anyone could advice on this.
Thanks in advance!
The text was updated successfully, but these errors were encountered: