Skip to content

Commit

Permalink
Update config import path for neural-compressor v2.6 (#801)
Browse files Browse the repository at this point in the history
Signed-off-by: changwangss <chang1.wang@intel.com>
  • Loading branch information
changwangss authored Jul 4, 2024
1 parent 384dda5 commit 50d867c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion optimum/intel/neural_compressor/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import torch.distributed as dist
from neural_compressor import training
from neural_compressor.compression import DistillationCallbacks
from neural_compressor.conf.pythonic_config import _BaseQuantizationConfig
from packaging import version
from torch import nn
from torch.utils.data import Dataset, RandomSampler
Expand Down Expand Up @@ -107,8 +106,10 @@
from optimum.exporters.onnx import OnnxConfig

if is_neural_compressor_version("<", "2.6"):
from neural_compressor.conf.pythonic_config import _BaseQuantizationConfig
from neural_compressor.experimental.export import torch_to_fp32_onnx, torch_to_int8_onnx
else:
from neural_compressor.config import _BaseQuantizationConfig
from neural_compressor.utils.export import torch_to_fp32_onnx, torch_to_int8_onnx


Expand Down

0 comments on commit 50d867c

Please sign in to comment.