Summary
With transformers 5.x installed, constructing TableDetector() (or AutoTableFormatter()) raises immediately, making gmft unusable:
File ".../gmft/detectors/tatr.py", line 48, in __init__
self.detector = TableTransformerForObjectDetection.from_pretrained(
...
File ".../huggingface_hub/dataclasses.py", line 146, in __strict_setattr__
raise StrictDataclassFieldValidationError(field=name, cause=e) from e
huggingface_hub.errors.StrictDataclassFieldValidationError: Validation error for field 'dilation':
TypeError: Field 'dilation' expected bool, got NoneType (value: None)
Reproduction
from gmft.auto import TableDetector
TableDetector() # raises
Versions
- gmft 0.4.2 and 0.4.3 (both affected)
- transformers 5.8.1 (also reproduced on 5.14.1)
- huggingface-hub 1.13.0
- Python 3.12
- Works fine with transformers 4.57.6
Root cause
transformers 5.x validates model configs with huggingface_hub's strict dataclasses. The microsoft/table-transformer-detection checkpoint's config.json on the Hub contains "dilation": null, which fails the bool field validation inside `from_pretcode runs. The structure-recognition checkpoint loads through the same path.
Why staying on 4.x is problematic
transformers < 5.3.0 / < 5.5.0 carry two high-severity advisories with no 4.x
So projects that upgrade transformers for these fixes lose gmft.
Summary
With transformers 5.x installed, constructing
TableDetector()(orAutoTableFormatter()) raises immediately, making gmft unusable:Reproduction
Versions
Root cause
transformers 5.x validates model configs with huggingface_hub's strict dataclasses. The
microsoft/table-transformer-detectioncheckpoint'sconfig.jsonon the Hub contains"dilation": null, which fails theboolfield validation inside `from_pretcode runs. The structure-recognition checkpoint loads through the same path.Why staying on 4.x is problematic
transformers < 5.3.0 / < 5.5.0 carry two high-severity advisories with no 4.x
So projects that upgrade transformers for these fixes lose gmft.