Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKoff88 committed Dec 15, 2023
1 parent d878453 commit 7f3b7cf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion optimum/exporters/openvino/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,12 @@ def main_export(
>>> main_export("gpt2", output="gpt2_onnx/")
```
"""
if compression_option is not None and compression_option != "f16" and compression_option != "f32" and not is_nncf_available():
if (
compression_option is not None
and compression_option != "f16"
and compression_option != "f32"
and not is_nncf_available()
):
raise ImportError(
f"Compression of the weights to {compression_option} requires nncf, please install it with `pip install nncf`"
)
Expand Down

0 comments on commit 7f3b7cf

Please sign in to comment.