diff --git a/internal/push/parity_golden_test.go b/internal/push/parity_golden_test.go index 2f15dbd..efa687d 100644 --- a/internal/push/parity_golden_test.go +++ b/internal/push/parity_golden_test.go @@ -138,6 +138,7 @@ func runGoPreflight(t *testing.T, c parityCase) string { Root: dir, LabelsCSV: filepath.Join(dir, c.CSV), Images: listImages(t, dir), + Sidecars: listSidecars(t, dir), } spec := SpecArgs{ Category: c.Category, @@ -179,6 +180,41 @@ func listImages(t *testing.T, dir string) []string { return out } +// listSidecars maps each sidecar directory in a case (any subdir that isn't +// images/ — annotations/, masks/, texts/, sequences/) to its files, mirroring +// how the production Discover populates LocalLayout.Sidecars. Without this the +// object_detection / semantic_segmentation pairing previews would see an empty +// sidecar set and reject every case (cli#288). +func listSidecars(t *testing.T, dir string) map[string][]string { + t.Helper() + entries, err := os.ReadDir(dir) + if err != nil { + t.Fatal(err) + } + sidecars := make(map[string][]string) + for _, e := range entries { + if !e.IsDir() || e.Name() == "images" { + continue + } + files, err := os.ReadDir(filepath.Join(dir, e.Name())) + if err != nil { + t.Fatal(err) + } + var out []string + for _, f := range files { + if !f.IsDir() { + out = append(out, filepath.Join(dir, e.Name(), f.Name())) + } + } + sort.Strings(out) + sidecars[e.Name()] = out + } + if len(sidecars) == 0 { + return nil + } + return sidecars +} + func mustLoad(t *testing.T, path string, into any) { t.Helper() b, err := os.ReadFile(path) diff --git a/internal/push/testdata/parity/cases.json b/internal/push/testdata/parity/cases.json index 5e84ffb..a1ec515 100644 --- a/internal/push/testdata/parity/cases.json +++ b/internal/push/testdata/parity/cases.json @@ -158,7 +158,7 @@ ], "cli_verdict": "accept", "ingestor_verdict": "reject", - "note": "DELIBERATE divergence (deployment parity, #348): 16x16 images are below the 32x32 default floor, so the pinned ingestor (develop, di#348/#356) rejects. But the CLI must NOT block by default — the DEPLOYED ingestor (v0.5.7/v0.6.0) has NO floor and ingests these fine, so a default local reject would block an ingest the live cluster accepts (the inverse of tabular-bom, whose reject mirrors a real deployed rejection). The CLI previews the floor ONLY when --min-size is set (see imgc-min-size-override). Flip this to reject and default the preview floor once di#348 ships to prod. Flagged for follow-up." + "note": "DELIBERATE divergence (deployment parity, #348): 16x16 images are below the 32x32 default floor, so the pinned ingestor (develop, di#348/#356) rejects. But the CLI must NOT block by default \u2014 the DEPLOYED ingestor (v0.5.7/v0.6.0) has NO floor and ingests these fine, so a default local reject would block an ingest the live cluster accepts (the inverse of tabular-bom, whose reject mirrors a real deployed rejection). The CLI previews the floor ONLY when --min-size is set (see imgc-min-size-override). Flip this to reject and default the preview floor once di#348 ships to prod. Flagged for follow-up." }, { "name": "imgc-min-size-override", @@ -176,7 +176,7 @@ ], "cli_verdict": "accept", "ingestor_verdict": "accept", - "note": "the --min-size override, cross-checked end-to-end (#348; closes the parity gap where min_size was representable on neither side). 24x40 images (W,H) with an explicit min_size [16,32] pass on BOTH sides — but the DEFAULT 32x32 floor would reject them (W=24<32), so this proves the override is actually read (not silently the default) and its [W,H] orientation is honored (a swapped [32,16] would reject on W=24<32). target_size matches the images, so the floor override is the sole discriminator.", + "note": "the --min-size override, cross-checked end-to-end (#348; closes the parity gap where min_size was representable on neither side). 24x40 images (W,H) with an explicit min_size [16,32] pass on BOTH sides \u2014 but the DEFAULT 32x32 floor would reject them (W=24<32), so this proves the override is actually read (not silently the default) and its [W,H] orientation is honored (a swapped [32,16] would reject on W=24<32). target_size matches the images, so the floor override is the sole discriminator.", "value_parity": true }, { @@ -474,6 +474,373 @@ "cli_verdict": "accept", "ingestor_verdict": "accept", "note": "OVER-REJECT regression pin (cli#218). p3's only label '#NA' is a pandas DEFAULT NA token (STR_NA_VALUES) but NOT in the curated coercion.NA_SENTINELS. LabelConstantWithinGroupValidator plain-reads the file, so pandas drops '#NA' to NaN and the label column is all-numeric -> p1's '1' and '1.0' collapse to one value (no flip) -> ACCEPT. Before the fix the CLI mirrored the coercion set, saw '#NA' as a distinct string, read the column as object, and flagged p1 as a false mid-sequence flip -> false REJECT. The Go preview now uses pandasDefaultNA for the grouped checks and accepts. (LabelDiversity reads with keep_default_na=False so '#NA' stays a literal class alongside 1/1.0/2 -> >=2 classes, still accepted.)" + }, + { + "extension": ".jpg", + "target_size": [ + 32, + 32 + ], + "csv": "labels.csv", + "name": "objdet-ok", + "category": "object_detection", + "label_column": "label", + "cli_verdict": "accept", + "ingestor_verdict": "accept", + "note": "object_detection happy path: paired images/annotations (valid Pascal VOC), filename-referenced manifest. Labels come from the XML, so the CSV has no label column \u2014 LabelDiversityValidator benign-skips on both sides." + }, + { + "extension": ".jpg", + "target_size": [ + 32, + 32 + ], + "csv": "labels.csv", + "name": "objdet-missing-annotation", + "category": "object_detection", + "label_column": "label", + "cli_verdict": "reject", + "ingestor_verdict": "reject", + "note": "b.jpg has no b.xml: FilePairingValidator rejects in-cluster; CheckAnnotationPairing previews the image-without-annotation direction." + }, + { + "extension": ".jpg", + "target_size": [ + 32, + 32 + ], + "csv": "labels.csv", + "name": "objdet-orphan-annotation", + "category": "object_detection", + "label_column": "label", + "cli_verdict": "reject", + "ingestor_verdict": "reject", + "note": "c.xml has no c.jpg: FilePairingValidator rejects orphan sidecars; CheckAnnotationPairing previews the annotation-without-image direction." + }, + { + "extension": ".jpg", + "target_size": [ + 32, + 32 + ], + "csv": "labels.csv", + "name": "objdet-bad-xml", + "category": "object_detection", + "label_column": "label", + "cli_verdict": "accept", + "ingestor_verdict": "reject", + "note": "DOCUMENTED under-preview: a.xml is malformed Pascal VOC (no , inverted bndbox) \u2014 PascalVOCXMLValidator rejects in-cluster, but the CLI has no XML-content mirror, so the failure surfaces post-upload. Candidate for a future CheckVOCAnnotations preview." + }, + { + "extension": ".jpg", + "target_size": [ + 32, + 32 + ], + "csv": "labels.csv", + "name": "semseg-ok", + "category": "semantic_segmentation", + "label_column": "label", + "cli_verdict": "accept", + "ingestor_verdict": "accept", + "note": "semantic_segmentation happy path: _mask.png pairing, 32x32 PNG masks (Mask Resolution Validator reads them), populated mask_id column. No label column \u2014 labels come from the masks; LabelDiversityValidator benign-skips on both sides." + }, + { + "extension": ".jpg", + "target_size": [ + 32, + 32 + ], + "csv": "labels.csv", + "name": "semseg-missing-mask", + "category": "semantic_segmentation", + "label_column": "label", + "cli_verdict": "reject", + "ingestor_verdict": "reject", + "note": "b.jpg has no b_mask.png: FilePairingValidator (sidecar_suffix=_mask) rejects; CheckMaskPairing previews the image-without-mask direction." + }, + { + "extension": ".jpg", + "target_size": [ + 32, + 32 + ], + "csv": "labels.csv", + "name": "semseg-badname-mask", + "category": "semantic_segmentation", + "label_column": "label", + "cli_verdict": "reject", + "ingestor_verdict": "reject", + "note": "b.png doesn't carry the _mask suffix: the ingestor keeps it as a non-conforming orphan AND reports b.jpg mask-less; CheckMaskPairing previews both (the #196 naming convention)." + }, + { + "extension": ".jpg", + "target_size": [ + 32, + 32 + ], + "csv": "labels.csv", + "name": "semseg-missing-mask-id", + "category": "semantic_segmentation", + "label_column": "label", + "cli_verdict": "reject", + "ingestor_verdict": "accept", + "note": "DELIBERATE divergence AT THIS PIN (7b4ecac, the di#359 merge): the manifest has no mask_id column. The CLI previews the backend#816 contract (CheckMaskIdColumn) \u2014 without mask_id the training client can't resolve masks and fails late. The PINNED ingestor predates di#358's MaskIdColumnValidator, so its preflight accepts. Flip ingestor_verdict to reject when the pin bumps past di#358 (cli#286 pin-bump); the goldens regen will flag exactly this case." + }, + { + "extension": ".jpg", + "target_size": [ + 32, + 32 + ], + "csv": "labels.csv", + "name": "kp-ok", + "category": "keypoint_detection", + "label_column": "label", + "cli_verdict": "accept", + "ingestor_verdict": "accept", + "note": "keypoint_detection happy path: filename + Annotation/Visibility JSON columns, 2 keypoints in-bounds with non-degenerate bbox, visibility 0/1 with matching keys. No label column (labels come from annotations) \u2014 LabelDiversityValidator benign-skips on both sides. num_keypoints is undeclared, matching an ingest without number_of_keypoints (the count check is skipped)." + }, + { + "extension": ".jpg", + "target_size": [ + 64, + 64 + ], + "csv": "labels.csv", + "name": "kp-res-mismatch", + "category": "keypoint_detection", + "label_column": "label", + "cli_verdict": "reject", + "ingestor_verdict": "reject", + "note": "32x32 images with target [64,64]: ImageResolutionValidator rejects, and the CLI's ValidateImages previews it \u2014 pins that the image-family common mirror covers keypoint_detection, not just image_classification." + }, + { + "extension": ".jpg", + "target_size": [ + 32, + 32 + ], + "csv": "labels.csv", + "name": "kp-bad-annotation", + "category": "keypoint_detection", + "label_column": "label", + "cli_verdict": "accept", + "ingestor_verdict": "reject", + "note": "DOCUMENTED under-preview: row 1's Annotation cell isn't JSON \u2014 KeypointAnnotationValidator rejects in-cluster, but the CLI has no keypoint-annotation mirror, so the failure surfaces post-upload. Candidate for a future keypoint JSON preview." + }, + { + "extension": ".txt", + "csv": "labels.csv", + "name": "text-clf-label-uniform", + "category": "text_classification", + "label_column": "label", + "cli_verdict": "reject", + "ingestor_verdict": "reject", + "note": "single-class text dataset: LabelDiversityValidator (is_classification wiring) rejects; CheckLabelDiversity previews it via the registry's IsClassification gate for the text family." + }, + { + "extension": ".txt", + "csv": "labels.csv", + "name": "token-clf-ok", + "category": "token_classification", + "label_column": "label", + "cli_verdict": "accept", + "ingestor_verdict": "accept", + "value_parity": true, + "note": "token_classification happy path: one IOB2 tag per whitespace token (BIOLabelValidator). NOT is_classification \u2014 no diversity gate on either side (BIO tag strings aren't class labels)." + }, + { + "extension": ".txt", + "csv": "labels.csv", + "name": "token-clf-label-missing", + "category": "token_classification", + "label_column": "label", + "cli_verdict": "reject", + "ingestor_verdict": "reject", + "note": "no label column: BIOLabelValidator rejects the missing column in-cluster (token_classification has no LabelColumnValidator); the CLI previews it with the same CheckLabelColumn gate every supervised text task gets." + }, + { + "extension": ".txt", + "csv": "labels.csv", + "name": "token-clf-bad-bio", + "category": "token_classification", + "label_column": "label", + "cli_verdict": "accept", + "ingestor_verdict": "reject", + "note": "DOCUMENTED under-preview: 'PERSON' isn't an IOB2 tag \u2014 BIOLabelValidator rejects in-cluster, but the CLI has no BIO-format mirror, so the failure surfaces post-upload. Candidate for a future BIO preview." + }, + { + "extension": ".txt", + "csv": "labels.csv", + "name": "sentpair-ok", + "category": "sentence_pair_classification", + "label_column": "label", + "cli_verdict": "accept", + "ingestor_verdict": "accept", + "value_parity": true, + "note": "sentence_pair_classification happy path: each .txt is exactly text_atext_b (SentencePairValidator), class label in the CSV, 2 classes." + }, + { + "extension": ".txt", + "csv": "labels.csv", + "name": "sentpair-label-uniform", + "category": "sentence_pair_classification", + "label_column": "label", + "cli_verdict": "reject", + "ingestor_verdict": "reject", + "note": "single-class pair dataset: LabelDiversityValidator rejects (sentence_pair_classification is is_classification); CheckLabelDiversity previews via the registry gate \u2014 pins that the preview isn't hardcoded to text_classification." + }, + { + "extension": ".txt", + "csv": "labels.csv", + "name": "sentpair-malformed", + "category": "sentence_pair_classification", + "label_column": "label", + "cli_verdict": "accept", + "ingestor_verdict": "reject", + "note": "DOCUMENTED under-preview: a.txt has no tab (not a text_atext_b pair) \u2014 SentencePairValidator rejects in-cluster; the CLI has no per-file structure mirror, so the failure surfaces post-upload." + }, + { + "extension": ".txt", + "csv": "labels.csv", + "name": "mlm-ok", + "category": "masked_language_modeling", + "cli_verdict": "accept", + "ingestor_verdict": "accept", + "note": "masked_language_modeling happy path: self-supervised (no label column anywhere), sequences/ sidecar dir (the one text task staging from sequences/, not texts/). Pins the self-supervised dispatch: no label checks fire on either side." + }, + { + "extension": ".txt", + "csv": "labels.csv", + "name": "mlm-missing-files", + "category": "masked_language_modeling", + "cli_verdict": "accept", + "ingestor_verdict": "reject", + "note": "DOCUMENTED under-preview: every referenced sequence file is absent (an unreferenced z.txt keeps FileTypeValidator satisfied) \u2014 IngestableRecordsValidator rejects the zero-ingestable-records manifest in-cluster; the CLI has no text-family file cross-check (CrossCheckLabels is image-only), so the failure surfaces post-upload." + }, + { + "extension": ".txt", + "csv": "labels.csv", + "name": "clm-ok", + "category": "causal_language_modeling", + "cli_verdict": "accept", + "ingestor_verdict": "accept", + "note": "causal_language_modeling happy path: raw prose AND a promptcompletion file \u2014 the record_format is a convention (enforced=False), so BOTH shapes must pass on both sides (a structural reject here would be an over-reject bug)." + }, + { + "extension": ".txt", + "csv": "labels.csv", + "name": "seq2seq-ok", + "category": "seq2seq", + "cli_verdict": "accept", + "ingestor_verdict": "accept", + "note": "seq2seq happy path: sourcetarget files, self-supervised (no label column), staged from texts/." + }, + { + "extension": ".txt", + "csv": "labels.csv", + "name": "emb-ok", + "category": "embeddings", + "cli_verdict": "accept", + "ingestor_verdict": "accept", + "note": "embeddings happy path: one anchorpositive pair AND one anchorpositivenegative triplet \u2014 ContrastivePairsValidator allows exactly these two shapes, so both must pass." + }, + { + "extension": ".txt", + "csv": "labels.csv", + "name": "emb-malformed", + "category": "embeddings", + "cli_verdict": "accept", + "ingestor_verdict": "reject", + "note": "DOCUMENTED under-preview: a.txt is a single field (no tab) \u2014 ContrastivePairsValidator rejects in-cluster; the CLI has no per-file structure mirror, so the failure surfaces post-upload." + }, + { + "csv": "data.csv", + "name": "tabreg-ok", + "category": "tabular_regression", + "label_column": "label", + "cli_verdict": "accept", + "ingestor_verdict": "accept", + "note": "tabular_regression happy path: numeric target, inferred schema on both sides." + }, + { + "csv": "data.csv", + "name": "tabreg-label-uniform", + "category": "tabular_regression", + "label_column": "label", + "cli_verdict": "accept", + "ingestor_verdict": "accept", + "note": "OVER-REJECT guard: every label identical. Regression is NOT is_classification, so no LabelDiversityValidator fires in-cluster \u2014 and the CLI's IsClassification gate must skip too. A hardcoded category check that ran diversity here would falsely reject a valid regression dataset." + }, + { + "csv": "data.csv", + "name": "tabreg-label-missing", + "category": "tabular_regression", + "label_column": "label", + "cli_verdict": "reject", + "ingestor_verdict": "accept", + "note": "DELIBERATE divergence (the tabular-label-missing twin for regression): the ingestor's preflight has no LabelColumnValidator for tabular_regression \u2014 the failure only fires at READ time (full-schema check, after table creation, orphaning it). The CLI previews the read-time rule (cli#69)." + }, + { + "csv": "data.csv", + "name": "tsf-ok", + "category": "time_series_forecasting", + "label_column": "label", + "schema": { + "timestamp": "TIMESTAMP", + "value": "FLOAT", + "label": "FLOAT" + }, + "cli_verdict": "accept", + "ingestor_verdict": "accept", + "note": "time_series_forecasting happy path: TIMESTAMP-typed timestamp column, ISO dates ascending and in the past, numeric features/target \u2014 passes TimeFormat/TimeOrdered/TimeBeforeToday/NumericColumns + DataValidator(schema minus timestamp)." + }, + { + "csv": "data.csv", + "name": "tsf-unsorted-time", + "category": "time_series_forecasting", + "label_column": "label", + "schema": { + "timestamp": "TIMESTAMP", + "value": "FLOAT", + "label": "FLOAT" + }, + "cli_verdict": "accept", + "ingestor_verdict": "reject", + "note": "DOCUMENTED under-preview: rows out of chronological order \u2014 the GLOBAL TimeOrderedValidator rejects in-cluster, but the CLI only previews the grouped per-sequence variant (CheckTSCGroupIntegrity, TSC-only); TSF's whole-file ordering has no mirror, so the failure surfaces post-upload." + }, + { + "csv": "data.csv", + "name": "tsf-missing-timestamp", + "category": "time_series_forecasting", + "label_column": "label", + "schema": { + "step": "INT", + "value": "FLOAT", + "label": "FLOAT" + }, + "cli_verdict": "accept", + "ingestor_verdict": "reject", + "note": "DOCUMENTED under-preview: no fixed 'timestamp' column \u2014 TimeFormatValidator rejects the schema in-cluster, but the CLI's preflight has no TSF fixed-timestamp mirror (CheckSequenceSchemaColumns covers only grouped TSC columns), so the failure surfaces post-upload. Candidate: extend the fixed-column preview to TSF." + }, + { + "csv": "data.csv", + "name": "tte-ok", + "category": "time_to_event_prediction", + "label_column": "label", + "cli_verdict": "accept", + "ingestor_verdict": "accept", + "note": "time_to_event_prediction happy path: exact 'time' column, numeric and non-negative (0.0 is legal) \u2014 TimeToEventValidator passes; inferred schema on both sides." + }, + { + "csv": "data.csv", + "name": "tte-negative-time", + "category": "time_to_event_prediction", + "label_column": "label", + "cli_verdict": "accept", + "ingestor_verdict": "reject", + "note": "DOCUMENTED under-preview: a negative 'time' value \u2014 TimeToEventValidator rejects in-cluster, but the CLI has no TTE time-column mirror, so the failure surfaces post-upload. Candidate for a future TTE preview." } ] } diff --git a/internal/push/testdata/parity/cases/clm-ok/labels.csv b/internal/push/testdata/parity/cases/clm-ok/labels.csv new file mode 100644 index 0000000..4a15382 --- /dev/null +++ b/internal/push/testdata/parity/cases/clm-ok/labels.csv @@ -0,0 +1,3 @@ +filename +a.txt +b.txt diff --git a/internal/push/testdata/parity/cases/clm-ok/texts/a.txt b/internal/push/testdata/parity/cases/clm-ok/texts/a.txt new file mode 100644 index 0000000..21083d2 --- /dev/null +++ b/internal/push/testdata/parity/cases/clm-ok/texts/a.txt @@ -0,0 +1 @@ +plain pretraining prose with no tabs diff --git a/internal/push/testdata/parity/cases/clm-ok/texts/b.txt b/internal/push/testdata/parity/cases/clm-ok/texts/b.txt new file mode 100644 index 0000000..647aaf4 --- /dev/null +++ b/internal/push/testdata/parity/cases/clm-ok/texts/b.txt @@ -0,0 +1 @@ +summarize this article it is about parity diff --git a/internal/push/testdata/parity/cases/emb-malformed/labels.csv b/internal/push/testdata/parity/cases/emb-malformed/labels.csv new file mode 100644 index 0000000..4a15382 --- /dev/null +++ b/internal/push/testdata/parity/cases/emb-malformed/labels.csv @@ -0,0 +1,3 @@ +filename +a.txt +b.txt diff --git a/internal/push/testdata/parity/cases/emb-malformed/texts/a.txt b/internal/push/testdata/parity/cases/emb-malformed/texts/a.txt new file mode 100644 index 0000000..5236729 --- /dev/null +++ b/internal/push/testdata/parity/cases/emb-malformed/texts/a.txt @@ -0,0 +1 @@ +just one field with no tab diff --git a/internal/push/testdata/parity/cases/emb-malformed/texts/b.txt b/internal/push/testdata/parity/cases/emb-malformed/texts/b.txt new file mode 100644 index 0000000..d3dd23d --- /dev/null +++ b/internal/push/testdata/parity/cases/emb-malformed/texts/b.txt @@ -0,0 +1 @@ +query text matching passage diff --git a/internal/push/testdata/parity/cases/emb-ok/labels.csv b/internal/push/testdata/parity/cases/emb-ok/labels.csv new file mode 100644 index 0000000..4a15382 --- /dev/null +++ b/internal/push/testdata/parity/cases/emb-ok/labels.csv @@ -0,0 +1,3 @@ +filename +a.txt +b.txt diff --git a/internal/push/testdata/parity/cases/emb-ok/texts/a.txt b/internal/push/testdata/parity/cases/emb-ok/texts/a.txt new file mode 100644 index 0000000..0118c8d --- /dev/null +++ b/internal/push/testdata/parity/cases/emb-ok/texts/a.txt @@ -0,0 +1 @@ +anchor sentence a close paraphrase diff --git a/internal/push/testdata/parity/cases/emb-ok/texts/b.txt b/internal/push/testdata/parity/cases/emb-ok/texts/b.txt new file mode 100644 index 0000000..c246079 --- /dev/null +++ b/internal/push/testdata/parity/cases/emb-ok/texts/b.txt @@ -0,0 +1 @@ +query text matching passage unrelated passage diff --git a/internal/push/testdata/parity/cases/kp-bad-annotation/images/a.jpg b/internal/push/testdata/parity/cases/kp-bad-annotation/images/a.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/kp-bad-annotation/images/a.jpg differ diff --git a/internal/push/testdata/parity/cases/kp-bad-annotation/images/b.jpg b/internal/push/testdata/parity/cases/kp-bad-annotation/images/b.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/kp-bad-annotation/images/b.jpg differ diff --git a/internal/push/testdata/parity/cases/kp-bad-annotation/labels.csv b/internal/push/testdata/parity/cases/kp-bad-annotation/labels.csv new file mode 100644 index 0000000..ffc7457 --- /dev/null +++ b/internal/push/testdata/parity/cases/kp-bad-annotation/labels.csv @@ -0,0 +1,3 @@ +filename,Annotation,Visibility +a.jpg,"not json at all","{""nose"": 1}" +b.jpg,"{""nose"": [6, 7], ""tail"": [18, 22]}","{""nose"": 1, ""tail"": 0}" diff --git a/internal/push/testdata/parity/cases/kp-ok/images/a.jpg b/internal/push/testdata/parity/cases/kp-ok/images/a.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/kp-ok/images/a.jpg differ diff --git a/internal/push/testdata/parity/cases/kp-ok/images/b.jpg b/internal/push/testdata/parity/cases/kp-ok/images/b.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/kp-ok/images/b.jpg differ diff --git a/internal/push/testdata/parity/cases/kp-ok/labels.csv b/internal/push/testdata/parity/cases/kp-ok/labels.csv new file mode 100644 index 0000000..8427b07 --- /dev/null +++ b/internal/push/testdata/parity/cases/kp-ok/labels.csv @@ -0,0 +1,3 @@ +filename,Annotation,Visibility +a.jpg,"{""nose"": [4, 5], ""tail"": [20, 25]}","{""nose"": 1, ""tail"": 1}" +b.jpg,"{""nose"": [6, 7], ""tail"": [18, 22]}","{""nose"": 1, ""tail"": 0}" diff --git a/internal/push/testdata/parity/cases/kp-res-mismatch/images/a.jpg b/internal/push/testdata/parity/cases/kp-res-mismatch/images/a.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/kp-res-mismatch/images/a.jpg differ diff --git a/internal/push/testdata/parity/cases/kp-res-mismatch/images/b.jpg b/internal/push/testdata/parity/cases/kp-res-mismatch/images/b.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/kp-res-mismatch/images/b.jpg differ diff --git a/internal/push/testdata/parity/cases/kp-res-mismatch/labels.csv b/internal/push/testdata/parity/cases/kp-res-mismatch/labels.csv new file mode 100644 index 0000000..8427b07 --- /dev/null +++ b/internal/push/testdata/parity/cases/kp-res-mismatch/labels.csv @@ -0,0 +1,3 @@ +filename,Annotation,Visibility +a.jpg,"{""nose"": [4, 5], ""tail"": [20, 25]}","{""nose"": 1, ""tail"": 1}" +b.jpg,"{""nose"": [6, 7], ""tail"": [18, 22]}","{""nose"": 1, ""tail"": 0}" diff --git a/internal/push/testdata/parity/cases/mlm-missing-files/labels.csv b/internal/push/testdata/parity/cases/mlm-missing-files/labels.csv new file mode 100644 index 0000000..4a15382 --- /dev/null +++ b/internal/push/testdata/parity/cases/mlm-missing-files/labels.csv @@ -0,0 +1,3 @@ +filename +a.txt +b.txt diff --git a/internal/push/testdata/parity/cases/mlm-missing-files/sequences/z.txt b/internal/push/testdata/parity/cases/mlm-missing-files/sequences/z.txt new file mode 100644 index 0000000..70cf623 --- /dev/null +++ b/internal/push/testdata/parity/cases/mlm-missing-files/sequences/z.txt @@ -0,0 +1 @@ +an unreferenced sequence diff --git a/internal/push/testdata/parity/cases/mlm-ok/labels.csv b/internal/push/testdata/parity/cases/mlm-ok/labels.csv new file mode 100644 index 0000000..4a15382 --- /dev/null +++ b/internal/push/testdata/parity/cases/mlm-ok/labels.csv @@ -0,0 +1,3 @@ +filename +a.txt +b.txt diff --git a/internal/push/testdata/parity/cases/mlm-ok/sequences/a.txt b/internal/push/testdata/parity/cases/mlm-ok/sequences/a.txt new file mode 100644 index 0000000..af9f93a --- /dev/null +++ b/internal/push/testdata/parity/cases/mlm-ok/sequences/a.txt @@ -0,0 +1 @@ +the quick brown fox jumps over the lazy dog diff --git a/internal/push/testdata/parity/cases/mlm-ok/sequences/b.txt b/internal/push/testdata/parity/cases/mlm-ok/sequences/b.txt new file mode 100644 index 0000000..71d010a --- /dev/null +++ b/internal/push/testdata/parity/cases/mlm-ok/sequences/b.txt @@ -0,0 +1 @@ +pack my box with five dozen liquor jugs diff --git a/internal/push/testdata/parity/cases/objdet-bad-xml/annotations/a.xml b/internal/push/testdata/parity/cases/objdet-bad-xml/annotations/a.xml new file mode 100644 index 0000000..ee9dbf1 --- /dev/null +++ b/internal/push/testdata/parity/cases/objdet-bad-xml/annotations/a.xml @@ -0,0 +1,17 @@ + + images + a.jpg + 0 + + widget + Unspecified + 0 + 0 + + 20 + 3 + 2 + 24 + + + diff --git a/internal/push/testdata/parity/cases/objdet-bad-xml/annotations/b.xml b/internal/push/testdata/parity/cases/objdet-bad-xml/annotations/b.xml new file mode 100644 index 0000000..6ab698a --- /dev/null +++ b/internal/push/testdata/parity/cases/objdet-bad-xml/annotations/b.xml @@ -0,0 +1,26 @@ + + images + b.jpg + + parity + PASCAL VOC + + + 32 + 32 + 3 + + 0 + + widget + Unspecified + 0 + 0 + + 2 + 3 + 20 + 24 + + + diff --git a/internal/push/testdata/parity/cases/objdet-bad-xml/images/a.jpg b/internal/push/testdata/parity/cases/objdet-bad-xml/images/a.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/objdet-bad-xml/images/a.jpg differ diff --git a/internal/push/testdata/parity/cases/objdet-bad-xml/images/b.jpg b/internal/push/testdata/parity/cases/objdet-bad-xml/images/b.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/objdet-bad-xml/images/b.jpg differ diff --git a/internal/push/testdata/parity/cases/objdet-bad-xml/labels.csv b/internal/push/testdata/parity/cases/objdet-bad-xml/labels.csv new file mode 100644 index 0000000..9f9ddb5 --- /dev/null +++ b/internal/push/testdata/parity/cases/objdet-bad-xml/labels.csv @@ -0,0 +1,3 @@ +filename +a.jpg +b.jpg diff --git a/internal/push/testdata/parity/cases/objdet-missing-annotation/annotations/a.xml b/internal/push/testdata/parity/cases/objdet-missing-annotation/annotations/a.xml new file mode 100644 index 0000000..9c54d2a --- /dev/null +++ b/internal/push/testdata/parity/cases/objdet-missing-annotation/annotations/a.xml @@ -0,0 +1,26 @@ + + images + a.jpg + + parity + PASCAL VOC + + + 32 + 32 + 3 + + 0 + + widget + Unspecified + 0 + 0 + + 2 + 3 + 20 + 24 + + + diff --git a/internal/push/testdata/parity/cases/objdet-missing-annotation/images/a.jpg b/internal/push/testdata/parity/cases/objdet-missing-annotation/images/a.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/objdet-missing-annotation/images/a.jpg differ diff --git a/internal/push/testdata/parity/cases/objdet-missing-annotation/images/b.jpg b/internal/push/testdata/parity/cases/objdet-missing-annotation/images/b.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/objdet-missing-annotation/images/b.jpg differ diff --git a/internal/push/testdata/parity/cases/objdet-missing-annotation/labels.csv b/internal/push/testdata/parity/cases/objdet-missing-annotation/labels.csv new file mode 100644 index 0000000..9f9ddb5 --- /dev/null +++ b/internal/push/testdata/parity/cases/objdet-missing-annotation/labels.csv @@ -0,0 +1,3 @@ +filename +a.jpg +b.jpg diff --git a/internal/push/testdata/parity/cases/objdet-ok/annotations/a.xml b/internal/push/testdata/parity/cases/objdet-ok/annotations/a.xml new file mode 100644 index 0000000..9c54d2a --- /dev/null +++ b/internal/push/testdata/parity/cases/objdet-ok/annotations/a.xml @@ -0,0 +1,26 @@ + + images + a.jpg + + parity + PASCAL VOC + + + 32 + 32 + 3 + + 0 + + widget + Unspecified + 0 + 0 + + 2 + 3 + 20 + 24 + + + diff --git a/internal/push/testdata/parity/cases/objdet-ok/annotations/b.xml b/internal/push/testdata/parity/cases/objdet-ok/annotations/b.xml new file mode 100644 index 0000000..6ab698a --- /dev/null +++ b/internal/push/testdata/parity/cases/objdet-ok/annotations/b.xml @@ -0,0 +1,26 @@ + + images + b.jpg + + parity + PASCAL VOC + + + 32 + 32 + 3 + + 0 + + widget + Unspecified + 0 + 0 + + 2 + 3 + 20 + 24 + + + diff --git a/internal/push/testdata/parity/cases/objdet-ok/images/a.jpg b/internal/push/testdata/parity/cases/objdet-ok/images/a.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/objdet-ok/images/a.jpg differ diff --git a/internal/push/testdata/parity/cases/objdet-ok/images/b.jpg b/internal/push/testdata/parity/cases/objdet-ok/images/b.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/objdet-ok/images/b.jpg differ diff --git a/internal/push/testdata/parity/cases/objdet-ok/labels.csv b/internal/push/testdata/parity/cases/objdet-ok/labels.csv new file mode 100644 index 0000000..9f9ddb5 --- /dev/null +++ b/internal/push/testdata/parity/cases/objdet-ok/labels.csv @@ -0,0 +1,3 @@ +filename +a.jpg +b.jpg diff --git a/internal/push/testdata/parity/cases/objdet-orphan-annotation/annotations/a.xml b/internal/push/testdata/parity/cases/objdet-orphan-annotation/annotations/a.xml new file mode 100644 index 0000000..9c54d2a --- /dev/null +++ b/internal/push/testdata/parity/cases/objdet-orphan-annotation/annotations/a.xml @@ -0,0 +1,26 @@ + + images + a.jpg + + parity + PASCAL VOC + + + 32 + 32 + 3 + + 0 + + widget + Unspecified + 0 + 0 + + 2 + 3 + 20 + 24 + + + diff --git a/internal/push/testdata/parity/cases/objdet-orphan-annotation/annotations/b.xml b/internal/push/testdata/parity/cases/objdet-orphan-annotation/annotations/b.xml new file mode 100644 index 0000000..6ab698a --- /dev/null +++ b/internal/push/testdata/parity/cases/objdet-orphan-annotation/annotations/b.xml @@ -0,0 +1,26 @@ + + images + b.jpg + + parity + PASCAL VOC + + + 32 + 32 + 3 + + 0 + + widget + Unspecified + 0 + 0 + + 2 + 3 + 20 + 24 + + + diff --git a/internal/push/testdata/parity/cases/objdet-orphan-annotation/annotations/c.xml b/internal/push/testdata/parity/cases/objdet-orphan-annotation/annotations/c.xml new file mode 100644 index 0000000..de19a77 --- /dev/null +++ b/internal/push/testdata/parity/cases/objdet-orphan-annotation/annotations/c.xml @@ -0,0 +1,26 @@ + + images + c.jpg + + parity + PASCAL VOC + + + 32 + 32 + 3 + + 0 + + widget + Unspecified + 0 + 0 + + 2 + 3 + 20 + 24 + + + diff --git a/internal/push/testdata/parity/cases/objdet-orphan-annotation/images/a.jpg b/internal/push/testdata/parity/cases/objdet-orphan-annotation/images/a.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/objdet-orphan-annotation/images/a.jpg differ diff --git a/internal/push/testdata/parity/cases/objdet-orphan-annotation/images/b.jpg b/internal/push/testdata/parity/cases/objdet-orphan-annotation/images/b.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/objdet-orphan-annotation/images/b.jpg differ diff --git a/internal/push/testdata/parity/cases/objdet-orphan-annotation/labels.csv b/internal/push/testdata/parity/cases/objdet-orphan-annotation/labels.csv new file mode 100644 index 0000000..9f9ddb5 --- /dev/null +++ b/internal/push/testdata/parity/cases/objdet-orphan-annotation/labels.csv @@ -0,0 +1,3 @@ +filename +a.jpg +b.jpg diff --git a/internal/push/testdata/parity/cases/semseg-badname-mask/images/a.jpg b/internal/push/testdata/parity/cases/semseg-badname-mask/images/a.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-badname-mask/images/a.jpg differ diff --git a/internal/push/testdata/parity/cases/semseg-badname-mask/images/b.jpg b/internal/push/testdata/parity/cases/semseg-badname-mask/images/b.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-badname-mask/images/b.jpg differ diff --git a/internal/push/testdata/parity/cases/semseg-badname-mask/labels.csv b/internal/push/testdata/parity/cases/semseg-badname-mask/labels.csv new file mode 100644 index 0000000..e4d4148 --- /dev/null +++ b/internal/push/testdata/parity/cases/semseg-badname-mask/labels.csv @@ -0,0 +1,3 @@ +filename,mask_id +a.jpg,a_mask.png +b.jpg,b.png diff --git a/internal/push/testdata/parity/cases/semseg-badname-mask/masks/a_mask.png b/internal/push/testdata/parity/cases/semseg-badname-mask/masks/a_mask.png new file mode 100644 index 0000000..3c5f243 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-badname-mask/masks/a_mask.png differ diff --git a/internal/push/testdata/parity/cases/semseg-badname-mask/masks/b.png b/internal/push/testdata/parity/cases/semseg-badname-mask/masks/b.png new file mode 100644 index 0000000..3c5f243 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-badname-mask/masks/b.png differ diff --git a/internal/push/testdata/parity/cases/semseg-missing-mask-id/images/a.jpg b/internal/push/testdata/parity/cases/semseg-missing-mask-id/images/a.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-missing-mask-id/images/a.jpg differ diff --git a/internal/push/testdata/parity/cases/semseg-missing-mask-id/images/b.jpg b/internal/push/testdata/parity/cases/semseg-missing-mask-id/images/b.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-missing-mask-id/images/b.jpg differ diff --git a/internal/push/testdata/parity/cases/semseg-missing-mask-id/labels.csv b/internal/push/testdata/parity/cases/semseg-missing-mask-id/labels.csv new file mode 100644 index 0000000..9f9ddb5 --- /dev/null +++ b/internal/push/testdata/parity/cases/semseg-missing-mask-id/labels.csv @@ -0,0 +1,3 @@ +filename +a.jpg +b.jpg diff --git a/internal/push/testdata/parity/cases/semseg-missing-mask-id/masks/a_mask.png b/internal/push/testdata/parity/cases/semseg-missing-mask-id/masks/a_mask.png new file mode 100644 index 0000000..3c5f243 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-missing-mask-id/masks/a_mask.png differ diff --git a/internal/push/testdata/parity/cases/semseg-missing-mask-id/masks/b_mask.png b/internal/push/testdata/parity/cases/semseg-missing-mask-id/masks/b_mask.png new file mode 100644 index 0000000..3c5f243 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-missing-mask-id/masks/b_mask.png differ diff --git a/internal/push/testdata/parity/cases/semseg-missing-mask/images/a.jpg b/internal/push/testdata/parity/cases/semseg-missing-mask/images/a.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-missing-mask/images/a.jpg differ diff --git a/internal/push/testdata/parity/cases/semseg-missing-mask/images/b.jpg b/internal/push/testdata/parity/cases/semseg-missing-mask/images/b.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-missing-mask/images/b.jpg differ diff --git a/internal/push/testdata/parity/cases/semseg-missing-mask/labels.csv b/internal/push/testdata/parity/cases/semseg-missing-mask/labels.csv new file mode 100644 index 0000000..69325d5 --- /dev/null +++ b/internal/push/testdata/parity/cases/semseg-missing-mask/labels.csv @@ -0,0 +1,3 @@ +filename,mask_id +a.jpg,a_mask.png +b.jpg,b_mask.png diff --git a/internal/push/testdata/parity/cases/semseg-missing-mask/masks/a_mask.png b/internal/push/testdata/parity/cases/semseg-missing-mask/masks/a_mask.png new file mode 100644 index 0000000..3c5f243 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-missing-mask/masks/a_mask.png differ diff --git a/internal/push/testdata/parity/cases/semseg-ok/images/a.jpg b/internal/push/testdata/parity/cases/semseg-ok/images/a.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-ok/images/a.jpg differ diff --git a/internal/push/testdata/parity/cases/semseg-ok/images/b.jpg b/internal/push/testdata/parity/cases/semseg-ok/images/b.jpg new file mode 100644 index 0000000..6520d39 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-ok/images/b.jpg differ diff --git a/internal/push/testdata/parity/cases/semseg-ok/labels.csv b/internal/push/testdata/parity/cases/semseg-ok/labels.csv new file mode 100644 index 0000000..69325d5 --- /dev/null +++ b/internal/push/testdata/parity/cases/semseg-ok/labels.csv @@ -0,0 +1,3 @@ +filename,mask_id +a.jpg,a_mask.png +b.jpg,b_mask.png diff --git a/internal/push/testdata/parity/cases/semseg-ok/masks/a_mask.png b/internal/push/testdata/parity/cases/semseg-ok/masks/a_mask.png new file mode 100644 index 0000000..3c5f243 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-ok/masks/a_mask.png differ diff --git a/internal/push/testdata/parity/cases/semseg-ok/masks/b_mask.png b/internal/push/testdata/parity/cases/semseg-ok/masks/b_mask.png new file mode 100644 index 0000000..3c5f243 Binary files /dev/null and b/internal/push/testdata/parity/cases/semseg-ok/masks/b_mask.png differ diff --git a/internal/push/testdata/parity/cases/sentpair-label-uniform/labels.csv b/internal/push/testdata/parity/cases/sentpair-label-uniform/labels.csv new file mode 100644 index 0000000..7463435 --- /dev/null +++ b/internal/push/testdata/parity/cases/sentpair-label-uniform/labels.csv @@ -0,0 +1,3 @@ +filename,label +a.txt,entails +b.txt,entails diff --git a/internal/push/testdata/parity/cases/sentpair-label-uniform/texts/a.txt b/internal/push/testdata/parity/cases/sentpair-label-uniform/texts/a.txt new file mode 100644 index 0000000..43c3761 --- /dev/null +++ b/internal/push/testdata/parity/cases/sentpair-label-uniform/texts/a.txt @@ -0,0 +1 @@ +a man is sleeping a person rests diff --git a/internal/push/testdata/parity/cases/sentpair-label-uniform/texts/b.txt b/internal/push/testdata/parity/cases/sentpair-label-uniform/texts/b.txt new file mode 100644 index 0000000..95863bb --- /dev/null +++ b/internal/push/testdata/parity/cases/sentpair-label-uniform/texts/b.txt @@ -0,0 +1 @@ +water is wet liquid feels wet diff --git a/internal/push/testdata/parity/cases/sentpair-malformed/labels.csv b/internal/push/testdata/parity/cases/sentpair-malformed/labels.csv new file mode 100644 index 0000000..aa44c49 --- /dev/null +++ b/internal/push/testdata/parity/cases/sentpair-malformed/labels.csv @@ -0,0 +1,3 @@ +filename,label +a.txt,entails +b.txt,contradicts diff --git a/internal/push/testdata/parity/cases/sentpair-malformed/texts/a.txt b/internal/push/testdata/parity/cases/sentpair-malformed/texts/a.txt new file mode 100644 index 0000000..a9fb676 --- /dev/null +++ b/internal/push/testdata/parity/cases/sentpair-malformed/texts/a.txt @@ -0,0 +1 @@ +no tab separator in this file diff --git a/internal/push/testdata/parity/cases/sentpair-malformed/texts/b.txt b/internal/push/testdata/parity/cases/sentpair-malformed/texts/b.txt new file mode 100644 index 0000000..8e48aa1 --- /dev/null +++ b/internal/push/testdata/parity/cases/sentpair-malformed/texts/b.txt @@ -0,0 +1 @@ +the sky is blue the sky is green diff --git a/internal/push/testdata/parity/cases/sentpair-ok/labels.csv b/internal/push/testdata/parity/cases/sentpair-ok/labels.csv new file mode 100644 index 0000000..aa44c49 --- /dev/null +++ b/internal/push/testdata/parity/cases/sentpair-ok/labels.csv @@ -0,0 +1,3 @@ +filename,label +a.txt,entails +b.txt,contradicts diff --git a/internal/push/testdata/parity/cases/sentpair-ok/texts/a.txt b/internal/push/testdata/parity/cases/sentpair-ok/texts/a.txt new file mode 100644 index 0000000..43c3761 --- /dev/null +++ b/internal/push/testdata/parity/cases/sentpair-ok/texts/a.txt @@ -0,0 +1 @@ +a man is sleeping a person rests diff --git a/internal/push/testdata/parity/cases/sentpair-ok/texts/b.txt b/internal/push/testdata/parity/cases/sentpair-ok/texts/b.txt new file mode 100644 index 0000000..8e48aa1 --- /dev/null +++ b/internal/push/testdata/parity/cases/sentpair-ok/texts/b.txt @@ -0,0 +1 @@ +the sky is blue the sky is green diff --git a/internal/push/testdata/parity/cases/seq2seq-ok/labels.csv b/internal/push/testdata/parity/cases/seq2seq-ok/labels.csv new file mode 100644 index 0000000..4a15382 --- /dev/null +++ b/internal/push/testdata/parity/cases/seq2seq-ok/labels.csv @@ -0,0 +1,3 @@ +filename +a.txt +b.txt diff --git a/internal/push/testdata/parity/cases/seq2seq-ok/texts/a.txt b/internal/push/testdata/parity/cases/seq2seq-ok/texts/a.txt new file mode 100644 index 0000000..f15c025 --- /dev/null +++ b/internal/push/testdata/parity/cases/seq2seq-ok/texts/a.txt @@ -0,0 +1 @@ +hello world hallo welt diff --git a/internal/push/testdata/parity/cases/seq2seq-ok/texts/b.txt b/internal/push/testdata/parity/cases/seq2seq-ok/texts/b.txt new file mode 100644 index 0000000..8cdea62 --- /dev/null +++ b/internal/push/testdata/parity/cases/seq2seq-ok/texts/b.txt @@ -0,0 +1 @@ +good morning guten morgen diff --git a/internal/push/testdata/parity/cases/tabreg-label-missing/data.csv b/internal/push/testdata/parity/cases/tabreg-label-missing/data.csv new file mode 100644 index 0000000..8ee8419 --- /dev/null +++ b/internal/push/testdata/parity/cases/tabreg-label-missing/data.csv @@ -0,0 +1,3 @@ +age,income +34,50000 +41,62000 diff --git a/internal/push/testdata/parity/cases/tabreg-label-uniform/data.csv b/internal/push/testdata/parity/cases/tabreg-label-uniform/data.csv new file mode 100644 index 0000000..2b6e94d --- /dev/null +++ b/internal/push/testdata/parity/cases/tabreg-label-uniform/data.csv @@ -0,0 +1,4 @@ +age,label +34,2.0 +41,2.0 +29,2.0 diff --git a/internal/push/testdata/parity/cases/tabreg-ok/data.csv b/internal/push/testdata/parity/cases/tabreg-ok/data.csv new file mode 100644 index 0000000..966f67c --- /dev/null +++ b/internal/push/testdata/parity/cases/tabreg-ok/data.csv @@ -0,0 +1,4 @@ +age,label +34,1.5 +41,2.75 +29,0.25 diff --git a/internal/push/testdata/parity/cases/text-clf-label-uniform/labels.csv b/internal/push/testdata/parity/cases/text-clf-label-uniform/labels.csv new file mode 100644 index 0000000..ba2c812 --- /dev/null +++ b/internal/push/testdata/parity/cases/text-clf-label-uniform/labels.csv @@ -0,0 +1,3 @@ +filename,label +a.txt,pos +b.txt,pos diff --git a/internal/push/testdata/parity/cases/text-clf-label-uniform/texts/a.txt b/internal/push/testdata/parity/cases/text-clf-label-uniform/texts/a.txt new file mode 100644 index 0000000..2fcf001 --- /dev/null +++ b/internal/push/testdata/parity/cases/text-clf-label-uniform/texts/a.txt @@ -0,0 +1 @@ +the movie was great diff --git a/internal/push/testdata/parity/cases/text-clf-label-uniform/texts/b.txt b/internal/push/testdata/parity/cases/text-clf-label-uniform/texts/b.txt new file mode 100644 index 0000000..bdc5b80 --- /dev/null +++ b/internal/push/testdata/parity/cases/text-clf-label-uniform/texts/b.txt @@ -0,0 +1 @@ +loved every minute diff --git a/internal/push/testdata/parity/cases/token-clf-bad-bio/labels.csv b/internal/push/testdata/parity/cases/token-clf-bad-bio/labels.csv new file mode 100644 index 0000000..6e1b227 --- /dev/null +++ b/internal/push/testdata/parity/cases/token-clf-bad-bio/labels.csv @@ -0,0 +1,3 @@ +filename,label +a.txt,PERSON O O +b.txt,B-ORG O B-PER diff --git a/internal/push/testdata/parity/cases/token-clf-bad-bio/texts/a.txt b/internal/push/testdata/parity/cases/token-clf-bad-bio/texts/a.txt new file mode 100644 index 0000000..67c8e7d --- /dev/null +++ b/internal/push/testdata/parity/cases/token-clf-bad-bio/texts/a.txt @@ -0,0 +1 @@ +John lives here diff --git a/internal/push/testdata/parity/cases/token-clf-bad-bio/texts/b.txt b/internal/push/testdata/parity/cases/token-clf-bad-bio/texts/b.txt new file mode 100644 index 0000000..bf77805 --- /dev/null +++ b/internal/push/testdata/parity/cases/token-clf-bad-bio/texts/b.txt @@ -0,0 +1 @@ +Acme hired Jane diff --git a/internal/push/testdata/parity/cases/token-clf-label-missing/labels.csv b/internal/push/testdata/parity/cases/token-clf-label-missing/labels.csv new file mode 100644 index 0000000..4a15382 --- /dev/null +++ b/internal/push/testdata/parity/cases/token-clf-label-missing/labels.csv @@ -0,0 +1,3 @@ +filename +a.txt +b.txt diff --git a/internal/push/testdata/parity/cases/token-clf-label-missing/texts/a.txt b/internal/push/testdata/parity/cases/token-clf-label-missing/texts/a.txt new file mode 100644 index 0000000..67c8e7d --- /dev/null +++ b/internal/push/testdata/parity/cases/token-clf-label-missing/texts/a.txt @@ -0,0 +1 @@ +John lives here diff --git a/internal/push/testdata/parity/cases/token-clf-label-missing/texts/b.txt b/internal/push/testdata/parity/cases/token-clf-label-missing/texts/b.txt new file mode 100644 index 0000000..bf77805 --- /dev/null +++ b/internal/push/testdata/parity/cases/token-clf-label-missing/texts/b.txt @@ -0,0 +1 @@ +Acme hired Jane diff --git a/internal/push/testdata/parity/cases/token-clf-ok/labels.csv b/internal/push/testdata/parity/cases/token-clf-ok/labels.csv new file mode 100644 index 0000000..ddb9e96 --- /dev/null +++ b/internal/push/testdata/parity/cases/token-clf-ok/labels.csv @@ -0,0 +1,3 @@ +filename,label +a.txt,B-PER O O +b.txt,B-ORG O B-PER diff --git a/internal/push/testdata/parity/cases/token-clf-ok/texts/a.txt b/internal/push/testdata/parity/cases/token-clf-ok/texts/a.txt new file mode 100644 index 0000000..67c8e7d --- /dev/null +++ b/internal/push/testdata/parity/cases/token-clf-ok/texts/a.txt @@ -0,0 +1 @@ +John lives here diff --git a/internal/push/testdata/parity/cases/token-clf-ok/texts/b.txt b/internal/push/testdata/parity/cases/token-clf-ok/texts/b.txt new file mode 100644 index 0000000..bf77805 --- /dev/null +++ b/internal/push/testdata/parity/cases/token-clf-ok/texts/b.txt @@ -0,0 +1 @@ +Acme hired Jane diff --git a/internal/push/testdata/parity/cases/tsf-missing-timestamp/data.csv b/internal/push/testdata/parity/cases/tsf-missing-timestamp/data.csv new file mode 100644 index 0000000..354b2e6 --- /dev/null +++ b/internal/push/testdata/parity/cases/tsf-missing-timestamp/data.csv @@ -0,0 +1,4 @@ +step,value,label +1,1.5,10.0 +2,2.5,11.0 +3,3.5,12.0 diff --git a/internal/push/testdata/parity/cases/tsf-ok/data.csv b/internal/push/testdata/parity/cases/tsf-ok/data.csv new file mode 100644 index 0000000..bff1cad --- /dev/null +++ b/internal/push/testdata/parity/cases/tsf-ok/data.csv @@ -0,0 +1,4 @@ +timestamp,value,label +2024-01-01 00:00:00,1.5,10.0 +2024-01-02 00:00:00,2.5,11.0 +2024-01-03 00:00:00,3.5,12.0 diff --git a/internal/push/testdata/parity/cases/tsf-unsorted-time/data.csv b/internal/push/testdata/parity/cases/tsf-unsorted-time/data.csv new file mode 100644 index 0000000..6ff6d81 --- /dev/null +++ b/internal/push/testdata/parity/cases/tsf-unsorted-time/data.csv @@ -0,0 +1,4 @@ +timestamp,value,label +2024-01-03 00:00:00,3.5,12.0 +2024-01-01 00:00:00,1.5,10.0 +2024-01-02 00:00:00,2.5,11.0 diff --git a/internal/push/testdata/parity/cases/tte-negative-time/data.csv b/internal/push/testdata/parity/cases/tte-negative-time/data.csv new file mode 100644 index 0000000..9d96dc6 --- /dev/null +++ b/internal/push/testdata/parity/cases/tte-negative-time/data.csv @@ -0,0 +1,3 @@ +time,event,label +-3.0,1,2.3 +12.5,0,4.1 diff --git a/internal/push/testdata/parity/cases/tte-ok/data.csv b/internal/push/testdata/parity/cases/tte-ok/data.csv new file mode 100644 index 0000000..7b0d1e1 --- /dev/null +++ b/internal/push/testdata/parity/cases/tte-ok/data.csv @@ -0,0 +1,4 @@ +time,event,label +5.0,1,2.3 +12.5,0,4.1 +0.0,1,1.7 diff --git a/internal/push/testdata/parity/goldens.json b/internal/push/testdata/parity/goldens.json index e1d5096..a61871e 100644 --- a/internal/push/testdata/parity/goldens.json +++ b/internal/push/testdata/parity/goldens.json @@ -1,6 +1,20 @@ { "_comment": "GENERATED by scripts/gen-validator-goldens.py from the REAL data-ingestors validators \u2014 do not hand-edit. Regenerate when the ingestor's rules change; parity_golden_test.go pins these.", "verdicts": { + "clm-ok": { + "errors": [], + "verdict": "accept" + }, + "emb-malformed": { + "errors": [ + "ContrastivePairsValidator: Row 0 ('a.txt'): expected 2 (anchorpositive) or 3 (anchorpositivenegative) tab-separated fields, found 1. Separate each field with exactly one tab." + ], + "verdict": "reject" + }, + "emb-ok": { + "errors": [], + "verdict": "accept" + }, "imgc-bom-labels": { "errors": [], "values": { @@ -144,6 +158,118 @@ ], "verdict": "reject" }, + "kp-bad-annotation": { + "errors": [ + "KeypointAnnotationValidator: Row 1: Invalid JSON in Annotation" + ], + "verdict": "reject" + }, + "kp-ok": { + "errors": [], + "verdict": "accept" + }, + "kp-res-mismatch": { + "errors": [ + "ImageResolutionValidator: Images with incorrect resolution found: ['images/b.jpg: (32, 32) (expected: [64, 64])', 'images/a.jpg: (32, 32) (expected: [64, 64])']" + ], + "verdict": "reject" + }, + "mlm-missing-files": { + "errors": [ + "IngestableRecordsValidator: No referenced data files could be found under 'sequences/'; nothing to ingest (0 ingestable records). Checked 2 filename reference(s) against 'sequences/' and none exist on disk. Verify the files are staged at that path and that the 'filename' column matches the staged filenames." + ], + "verdict": "reject" + }, + "mlm-ok": { + "errors": [], + "verdict": "accept" + }, + "objdet-bad-xml": { + "errors": [ + "PascalVOCXMLValidator: a.xml: Missing required root elements: ['size', 'source']", + "PascalVOCXMLValidator: a.xml: Missing required 'source' element", + "PascalVOCXMLValidator: a.xml: Missing required 'size' element", + "PascalVOCXMLValidator: a.xml: Object 0: xmin (20) must be less than xmax (2)" + ], + "verdict": "reject" + }, + "objdet-missing-annotation": { + "errors": [ + "FilePairingValidator: 1 image(s) have no matching annotation: ['b']" + ], + "verdict": "reject" + }, + "objdet-ok": { + "errors": [], + "verdict": "accept" + }, + "objdet-orphan-annotation": { + "errors": [ + "FilePairingValidator: 1 annotation(s) have no matching image: ['c']" + ], + "verdict": "reject" + }, + "semseg-badname-mask": { + "errors": [ + "FilePairingValidator: 1 image(s) have no matching mask: ['b']", + "FilePairingValidator: 1 mask(s) have no matching image: ['b']" + ], + "verdict": "reject" + }, + "semseg-missing-mask": { + "errors": [ + "FilePairingValidator: 1 image(s) have no matching mask: ['b']" + ], + "verdict": "reject" + }, + "semseg-missing-mask-id": { + "errors": [], + "verdict": "accept" + }, + "semseg-ok": { + "errors": [], + "verdict": "accept" + }, + "sentpair-label-uniform": { + "errors": [ + "LabelDiversityValidator: Classification category requires at least 2 distinct label values in column 'label' (after whitespace stripping); this dataset has 1 distinct value(s): ['entails']. Raw value counts: {'entails': 2}. If this is intentional (e.g. you have a continuous target), pick a regression-family category like tabular_regression or time_series_forecasting instead." + ], + "verdict": "reject" + }, + "sentpair-malformed": { + "errors": [ + "SentencePairValidator: Row 0 ('a.txt'): expected exactly 2 (text_atext_b) tab-separated fields, found 1. Separate each field with exactly one tab." + ], + "verdict": "reject" + }, + "sentpair-ok": { + "errors": [], + "values": { + "classes": [ + "contradicts", + "entails" + ], + "resolved_label": "label", + "row_count": 2 + }, + "verdict": "accept" + }, + "seq2seq-ok": { + "errors": [], + "verdict": "accept" + }, + "tabreg-label-missing": { + "errors": [], + "verdict": "accept" + }, + "tabreg-label-uniform": { + "errors": [], + "verdict": "accept" + }, + "tabreg-ok": { + "errors": [], + "verdict": "accept" + }, "tabular-bom": { "errors": [], "verdict": "accept" @@ -209,6 +335,12 @@ }, "verdict": "accept" }, + "text-clf-label-uniform": { + "errors": [ + "LabelDiversityValidator: Classification category requires at least 2 distinct label values in column 'label' (after whitespace stripping); this dataset has 1 distinct value(s): ['pos']. Raw value counts: {'pos': 2}. If this is intentional (e.g. you have a continuous target), pick a regression-family category like tabular_regression or time_series_forecasting instead." + ], + "verdict": "reject" + }, "text-clf-ok": { "errors": [], "values": { @@ -221,6 +353,30 @@ }, "verdict": "accept" }, + "token-clf-bad-bio": { + "errors": [ + "BIOLabelValidator: Row 0 ('a.txt'): 1 invalid BIO tag(s), masked shapes ['xxxxxx']; each tag must be 'O' or 'B-' / 'I-'." + ], + "verdict": "reject" + }, + "token-clf-label-missing": { + "errors": [ + "BIOLabelValidator: Missing required column(s): label" + ], + "verdict": "reject" + }, + "token-clf-ok": { + "errors": [], + "values": { + "classes": [ + "B-ORG O B-PER", + "B-PER O O" + ], + "resolved_label": "label", + "row_count": 2 + }, + "verdict": "accept" + }, "tsc-label-flip": { "errors": [ "LabelConstantWithinGroupValidator: Found 1 sequence(s) whose 'label' value changes mid-sequence (first offending sequences start at rows [0]). Time-series classification assigns ONE label per sequence: every row of a 'sequence_id' must repeat the same label value." @@ -264,6 +420,34 @@ "PerGroupTimeOrderedValidator: Found 1 sequence(s) with out-of-order 'timestamp' values (first offending rows [1]). Timestep rows must be sorted by 'timestamp' within each 'sequence_id' \u2014 sort each sequence's rows ascending and re-run. Interleaving different sequences is fine; ordering is only checked within a sequence." ], "verdict": "reject" + }, + "tsf-missing-timestamp": { + "errors": [ + "TimeFormatValidator: Schema must contain a 'timestamp' column. For time series forecasting, a 'timestamp' column is required.", + "TimeOrderedValidator: Required column 'timestamp' not found. Available: ['step', 'value', 'label']", + "TimeBeforeTodayValidator: Required column 'timestamp' not found. Available: ['step', 'value', 'label']" + ], + "verdict": "reject" + }, + "tsf-ok": { + "errors": [], + "verdict": "accept" + }, + "tsf-unsorted-time": { + "errors": [ + "TimeOrderedValidator: Found 1 out-of-order timestamp pair(s)" + ], + "verdict": "reject" + }, + "tte-negative-time": { + "errors": [ + "TimeToEventValidator: Time column 'time' contains 1 negative value(s) at rows [0]. Time values must be non-negative." + ], + "verdict": "reject" + }, + "tte-ok": { + "errors": [], + "verdict": "accept" } } }