Skip to content
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

add mypy type hints to reduce possible sources of error #2296

Open
andife opened this issue Jan 23, 2024 · 0 comments
Open

add mypy type hints to reduce possible sources of error #2296

andife opened this issue Jan 23, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@andife
Copy link
Member

andife commented Jan 23, 2024

Before submitting your request, please review past submissions to ensure that it is not a duplicate of a known feature request.

Describe the feature request

Add mypy type hints to code (for example

def from_keras(model, input_signature=None, opset=None, custom_ops=None, custom_op_handlers=None,
)

def from_keras(model, input_signature=None, opset=None, custom_ops=None, custom_op_handlers=None,
custom_rewriter=None, inputs_as_nchw=None, outputs_as_nchw=None, extra_opset=None, shape_override=None,
target=None, large_model=False, output_path=None, optimizers=None):

Type hints would reduce possible sources of error here.

For example, the following is possible in the CLI:

python -m tf2onnx.convert --opset 10 --outputs-as-nchw output --inputs-as-nchw input --saved-model .\saved_models\,

but not in the code, as a list is expected.

@andife andife added the enhancement New feature or request label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant