Repository navigation
Inspection Results: JSON files or Postgres for inspection results? #5
|
From DMP: Where do inspection results live? Postgres from the start, or keep it simple for now? |
Replies: 1 comment
|
JSON Lines files for v0.1, Postgres once the API is serving. Right now every result comes from offline runs over a fixed test set. JSONL (one The switch point is when the API handles live uploads: concurrent writes, and queries like "all anomalous parts from line 3 this week". At that point a Postgres table with the scalar fields as columns and Because everything goes through the Pydantic model, the storage layer is one small interface ( |
JSON Lines files for v0.1, Postgres once the API is serving.
Right now every result comes from offline runs over a fixed test set. JSONL (one
InspectionResultper line, one file per experiment run) is append-only, diffable, trivially reproducible, and the evaluation harness can load it straight into a dataframe. A database adds migrations and a running service for no gain yet.The switch point is when the API handles live uploads: concurrent writes, and queries like "all anomalous parts from line 3 this week". At that point a Postgres table with the scalar fields as columns and
defectsas JSONB fits well.Because everything goes through the Pydantic model, the storage layer is one small i…