Skip to content

.export_model() breaks with PyTorch 1.11 and later #1354

Description

@helena-intel

The .export_model() method for PyTorch models calls torch.onnx.export() with the enable_onnx_checker parameter set to False:
https://github.com/openvinotoolkit/nncf/blob/develop/nncf/torch/exporter.py#L163
This parameter exists in PyTorch 1.9.1 and is set to True by default. In 1.10 the parameter is deprecated, and in 1.11 it doesn't exist anymore. This means that using NNCF with PyTorch 1.11 or later results in an error:
image

Could this be changed in NNCF so that it doesn't break with PyTorch 1.11 and later? I had no issues with NNCF with recent PyTorch versions if I manually remove this line.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions