|
32 | 32 | "test_time", "avg_ns", "stddev_ns", "avg_ts", "stddev_ts", |
33 | 33 | ] |
34 | 34 |
|
| 35 | +DB_TYPES = [ |
| 36 | + "TEXT", "INTEGER", "TEXT", "TEXT", "TEXT", "TEXT", |
| 37 | + "TEXT", "INTEGER", "INTEGER", "INTEGER", "INTEGER", "INTEGER", |
| 38 | + "TEXT", "INTEGER", "INTEGER", "TEXT", "TEXT", "INTEGER", |
| 39 | + "TEXT", "INTEGER", "INTEGER", "INTEGER", "TEXT", "TEXT", |
| 40 | + "REAL", |
| 41 | + "INTEGER", "INTEGER", "INTEGER", "INTEGER", "INTEGER", "INTEGER", |
| 42 | + "TEXT", "INTEGER", "INTEGER", "REAL", "REAL", |
| 43 | +] |
| 44 | + |
35 | 45 | # Properties by which to differentiate results per commit: |
36 | 46 | KEY_PROPERTIES = [ |
37 | 47 | "cpu_info", "gpu_info", "backends", "n_gpu_layers", "tensor_buft_overrides", "model_filename", "model_type", |
@@ -240,7 +250,7 @@ def __init__(self): |
240 | 250 | super().__init__() |
241 | 251 | self.connection = sqlite3.connect(":memory:") |
242 | 252 | self.cursor = self.connection.cursor() |
243 | | - self.cursor.execute(f"CREATE TABLE test({', '.join(DB_FIELDS)});") |
| 253 | + self.cursor.execute(f"CREATE TABLE test({', '.join(' '.join(x) for x in zip(DB_FIELDS, DB_TYPES))});") |
244 | 254 |
|
245 | 255 | def _builds_init(self): |
246 | 256 | if self.connection: |
@@ -354,7 +364,6 @@ def __init__(self, data_files: list[str]): |
354 | 364 | if (missing_keys := self._check_keys(keys)): |
355 | 365 | raise RuntimeError(f"Missing required data key(s) at line {i + 1}: {', '.join(missing_keys)}") |
356 | 366 |
|
357 | | - # FIXME: Convert float/int columns from str! |
358 | 367 | self.cursor.execute(f"INSERT INTO test({', '.join(parsed.keys())}) VALUES({', '.join('?' * len(parsed))});", tuple(parsed.values())) |
359 | 368 |
|
360 | 369 | self._builds_init() |
|
0 commit comments