fix(scripts): add created_at timestamps to annotation import
Set created_at field for both span_label_types and span_annotations to satisfy NOT NULL constraint
This commit is contained in:
parent
a68a681c9b
commit
57240d4eea
2 changed files with 2338 additions and 0 deletions
|
|
@ -95,6 +95,7 @@ async function ensureLabelTypes(labels: string[]): Promise<LabelTypeMap> {
|
||||||
hotkey: null,
|
hotkey: null,
|
||||||
is_active: 1,
|
is_active: 1,
|
||||||
sort_order: sortOrder++,
|
sort_order: sortOrder++,
|
||||||
|
created_at: Math.floor(Date.now() / 1000),
|
||||||
}).returning();
|
}).returning();
|
||||||
|
|
||||||
labelMap[label] = {
|
labelMap[label] = {
|
||||||
|
|
@ -144,6 +145,7 @@ async function importAnnotations(
|
||||||
color: labelInfo.color,
|
color: labelInfo.color,
|
||||||
source: ann.source || 'programmatic',
|
source: ann.source || 'programmatic',
|
||||||
model_prediction: null,
|
model_prediction: null,
|
||||||
|
created_at: Math.floor(Date.now() / 1000),
|
||||||
});
|
});
|
||||||
|
|
||||||
imported++;
|
imported++;
|
||||||
|
|
|
||||||
2336
services/ml/talib_annotations.json
Normal file
2336
services/ml/talib_annotations.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue