Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mlprodict/onnxrt/ops_cpu/_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def __init__(self, onnx_node, desc=None, expected_attributes=None,

if onnx_node.op_type not in _at_least_one:
for k, v in self._schema.attributes.items():
if not hasattr(self, k):
if not hasattr(self, k) and getattr(v, 'required', True):
raise RuntimeError( # pragma: no cover
"Attribute '{}' is expected based on ONNX specifications "
"for node '{}' and options {}.".format(
Expand Down