Open
Description
The current version of code, in CI/CD, crash. See here
unstructured_inference/models/donut.py:26: error: Incompatible default for argument "model" (default has type "None", argument has type "str | Path | VisionEncoderDecoderModel") [assignment]
unstructured_inference/models/donut.py:26: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
unstructured_inference/models/donut.py:26: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
unstructured_inference/models/donut.py:27: error: Incompatible default for argument "processor" (default has type "None", argument has type "str | Path | DonutProcessor") [assignment]
unstructured_inference/models/donut.py:27: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
unstructured_inference/models/donut.py:27: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
unstructured_inference/models/donut.py:39: error: Incompatible types in assignment (expression has type "PretrainedConfig", variable has type "str | Path | VisionEncoderDecoderConfig | None") [assignment]
unstructured_inference/models/donut.py:39: error: Argument 1 to "from_pretrained" of "PretrainedConfig" has incompatible type "str | Path | VisionEncoderDecoderConfig | None"; expected "str | PathLike[Any]" [arg-type]
unstructured_inference/models/donut.py:42: error: Argument 1 to "from_pretrained" of "ProcessorMixin" has incompatible type "str | Path | DonutProcessor"; expected "str | PathLike[Any]" [arg-type]
unstructured_inference/models/tables.py:59: error: Incompatible default for argument "model" (default has type "None", argument has type "str | Path | TableTransformerForObjectDetection") [assignment]
unstructured_inference/models/tables.py:59: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
unstructured_inference/models/tables.py:59: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
unstructured_inference/models/tables.py:90: error: "DetrImageProcessor" not callable [operator]
unstructured_inference/models/tables.py:182: error: Argument 1 to "outputs_to_objects" has incompatible type "dict[Any, Any]"; expected "TableTransformerObjectDetectionOutput" [arg-type]
Found 8 errors in 2 files (checked 21 source files)
Metadata
Metadata
Assignees
Labels
No labels