Unstructured-IO / Unstructured-IO/unstructured-inference
[CI/CD] impossible
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 209
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported type-check errors in unstructured_inference/models/donut.py and unstructured_inference/models/tables.py, using the linked CI run as the failure context. Run the repository's CI type-check and address the eight reported errors; done means the check passes without these errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ci-cd, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100