WIP
This commit is contained in:
@@ -17,9 +17,8 @@ from inference.data.admin_models import (
|
||||
AdminDocument,
|
||||
AdminAnnotation,
|
||||
TrainingTask,
|
||||
FIELD_CLASSES,
|
||||
CSV_TO_CLASS_MAPPING,
|
||||
)
|
||||
from shared.fields import FIELD_CLASSES, CSV_TO_CLASS_MAPPING
|
||||
|
||||
|
||||
class TestBatchUpload:
|
||||
@@ -507,7 +506,10 @@ class TestCSVToClassMapping:
|
||||
assert len(CSV_TO_CLASS_MAPPING) > 0
|
||||
|
||||
def test_csv_mapping_values(self):
|
||||
"""Test specific CSV column mappings."""
|
||||
"""Test specific CSV column mappings.
|
||||
|
||||
Note: customer_number is class 8 (verified from trained model best.pt).
|
||||
"""
|
||||
assert CSV_TO_CLASS_MAPPING["InvoiceNumber"] == 0
|
||||
assert CSV_TO_CLASS_MAPPING["InvoiceDate"] == 1
|
||||
assert CSV_TO_CLASS_MAPPING["InvoiceDueDate"] == 2
|
||||
@@ -516,7 +518,7 @@ class TestCSVToClassMapping:
|
||||
assert CSV_TO_CLASS_MAPPING["Plusgiro"] == 5
|
||||
assert CSV_TO_CLASS_MAPPING["Amount"] == 6
|
||||
assert CSV_TO_CLASS_MAPPING["supplier_organisation_number"] == 7
|
||||
assert CSV_TO_CLASS_MAPPING["customer_number"] == 9
|
||||
assert CSV_TO_CLASS_MAPPING["customer_number"] == 8 # Fixed: was 9, model uses 8
|
||||
|
||||
def test_csv_mapping_matches_field_classes(self):
|
||||
"""Test that CSV mapping is consistent with FIELD_CLASSES."""
|
||||
|
||||
Reference in New Issue
Block a user