|
39 | 39 | create_mock_engine,
|
40 | 40 | inspect,
|
41 | 41 | )
|
42 |
| -from sqlalchemy.dialects import mysql |
43 | 42 | from sqlalchemy.engine import Engine
|
44 | 43 |
|
45 | 44 | from mlos_bench.util import path_join
|
@@ -105,8 +104,8 @@ def __init__(self, engine: Engine | None):
|
105 | 104 | Column("git_repo", String(1024), nullable=False),
|
106 | 105 | Column("git_commit", String(40), nullable=False),
|
107 | 106 | # For backwards compatibility, we allow NULL for ts_start.
|
108 |
| - Column("ts_start", DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql")), |
109 |
| - Column("ts_end", DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql")), |
| 107 | + Column("ts_start", DateTime), |
| 108 | + Column("ts_end", DateTime), |
110 | 109 | # Should match the text IDs of `mlos_bench.environments.Status` enum:
|
111 | 110 | # For backwards compatibility, we allow NULL for status.
|
112 | 111 | Column("status", String(self._STATUS_LEN)),
|
@@ -180,16 +179,8 @@ def __init__(self, engine: Engine | None):
|
180 | 179 | Column("trial_id", Integer, nullable=False),
|
181 | 180 | Column("config_id", Integer, nullable=False),
|
182 | 181 | Column("trial_runner_id", Integer, nullable=True, default=None),
|
183 |
| - Column( |
184 |
| - "ts_start", |
185 |
| - DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql"), |
186 |
| - nullable=False, |
187 |
| - ), |
188 |
| - Column( |
189 |
| - "ts_end", |
190 |
| - DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql"), |
191 |
| - nullable=True, |
192 |
| - ), |
| 182 | + Column("ts_start", DateTime, nullable=False), |
| 183 | + Column("ts_end", DateTime), |
193 | 184 | # Should match the text IDs of `mlos_bench.environments.Status` enum:
|
194 | 185 | Column("status", String(self._STATUS_LEN), nullable=False),
|
195 | 186 | PrimaryKeyConstraint("exp_id", "trial_id"),
|
@@ -241,12 +232,7 @@ def __init__(self, engine: Engine | None):
|
241 | 232 | self._meta,
|
242 | 233 | Column("exp_id", String(self._ID_LEN), nullable=False),
|
243 | 234 | Column("trial_id", Integer, nullable=False),
|
244 |
| - Column( |
245 |
| - "ts", |
246 |
| - DateTime(timezone=True).with_variant(mysql.DATETIME(fsp=6), "mysql"), |
247 |
| - nullable=False, |
248 |
| - default="now", |
249 |
| - ), |
| 235 | + Column("ts", DateTime(timezone=True), nullable=False, default="now"), |
250 | 236 | Column("status", String(self._STATUS_LEN), nullable=False),
|
251 | 237 | UniqueConstraint("exp_id", "trial_id", "ts"),
|
252 | 238 | ForeignKeyConstraint(
|
@@ -281,12 +267,7 @@ def __init__(self, engine: Engine | None):
|
281 | 267 | self._meta,
|
282 | 268 | Column("exp_id", String(self._ID_LEN), nullable=False),
|
283 | 269 | Column("trial_id", Integer, nullable=False),
|
284 |
| - Column( |
285 |
| - "ts", |
286 |
| - DateTime(timezone=True).with_variant(mysql.DATETIME(fsp=6), "mysql"), |
287 |
| - nullable=False, |
288 |
| - default="now", |
289 |
| - ), |
| 270 | + Column("ts", DateTime(timezone=True), nullable=False, default="now"), |
290 | 271 | Column("metric_id", String(self._ID_LEN), nullable=False),
|
291 | 272 | Column("metric_value", String(self._METRIC_VALUE_LEN)),
|
292 | 273 | UniqueConstraint("exp_id", "trial_id", "ts", "metric_id"),
|
|
0 commit comments