Skip to content

Commit

Permalink
throw an error if opset < 14 is used
Browse files Browse the repository at this point in the history
  • Loading branch information
dsikka committed Jun 23, 2023
1 parent 68f756a commit 980b6bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions integrations/clip/clip_onnx_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ def _export_onnx(
opset: int = 14,
**export_kwargs,
):
# _export_onnx by default uses opset = 14 as required by CLIP and will fail
# for opset < 14 as certain operators are not supported.
if opset < 14:
raise ValueError("CLIP onnx export requires a minimum opset of 14")

export_onnx(
module=module,
sample_batch=sample_batch,
Expand Down

0 comments on commit 980b6bc

Please sign in to comment.