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
Copy file name to clipboardExpand all lines: docs/storage.md
+15-11Lines changed: 15 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -76,39 +76,41 @@ create_all_tables(engine)
76
76
Then save your experiment:
77
77
```py
78
78
from ax import Experiment
79
-
from ax importsqa_store
79
+
from ax.storage.sqa_store.saveimportsave_experiment
80
80
81
81
experiment = Experiment(...)
82
-
sqa_store.save(experiment)
82
+
save_experiment(experiment)
83
83
```
84
84
85
85
The experiment (including attached data) will be saved to the corresponding tables.
86
86
87
87
Alternatively, you can pass a [creator function](https://docs.sqlalchemy.org/en/latest/core/engines.html#sqlalchemy.create_engine.params.creator) instead of a url to `init_engine_and_session_factory`:
88
88
89
89
```py
90
-
from ax import Experiment, sqa_store
90
+
from ax import Experiment
91
91
from ax.storage.sqa_store.db import init_engine_and_session_factory
92
+
from ax.storage.sqa_store.save import save_experiment
92
93
93
94
init_engine_and_session_factory(creator=creator)
94
95
experiment = Experiment(...)
95
-
sqa_store.save(experiment)
96
+
save_experiment(experiment)
96
97
```
97
98
98
99
### Updating
99
100
100
-
To update a SQL-backed experiment, call `sqa_store.save(experiment)` again. Ax will determine what updates to perform.
101
+
To update a SQL-backed experiment, call `save_experiment(experiment)` again. Ax will determine what updates to perform.
101
102
102
103
### Loading
103
104
104
105
To load an experiment from SQL, specify the name:
105
106
106
107
```py
107
-
from ax import Experiment, sqa_store
108
+
from ax import Experiment
108
109
from ax.storage.sqa_store.db import init_engine_and_session_factory
110
+
from ax.storage.sqa_store.load import load_experiment
0 commit comments