Skip to content

[CI/CD] impossible #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pprados opened this issue Apr 16, 2025 · 1 comment
Open

[CI/CD] impossible #420

pprados opened this issue Apr 16, 2025 · 1 comment

Comments

@pprados
Copy link
Contributor

pprados commented Apr 16, 2025

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)
@pprados
Copy link
Contributor Author

pprados commented Apr 16, 2025

Réference here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant