[CI/CD] impossible

Open
#420 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

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.

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)
Dominant language
Python
Stars
211
Forks
79
Avg merge
4d 23h
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Unstructured-IO/unstructured-inference

All issues in Unstructured-IO/unstructured-inference

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.