Skip to content

Commit

Permalink
mt
Browse files Browse the repository at this point in the history
  • Loading branch information
vshampor committed Oct 25, 2023
1 parent c7d45c8 commit d17f8ee
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/experimental/openvino/bert/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
from pathlib import Path
from typing import Any, Iterable

import datasets
import evaluate
import numpy as np
import openvino.runtime as ov
import torch
import transformers

import datasets
import nncf
from nncf.parameters import ModelType

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
from nncf.quantization.algorithms.bias_correction.backend import BiasCorrectionAlgoBackend


@ALGO_BACKENDS.register(BackendType.ONNX)
class ONNXBiasCorrectionAlgoBackend(BiasCorrectionAlgoBackend):
@property
def tensor_processor(self) -> ONNXNNCFCollectorTensorProcessor:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
from nncf.quantization.algorithms.bias_correction.backend import BiasCorrectionAlgoBackend


@ALGO_BACKENDS.register(BackendType.OPENVINO)
class OVBiasCorrectionAlgoBackend(BiasCorrectionAlgoBackend):
@property
def tensor_processor(self) -> OVNNCFCollectorTensorProcessor:
Expand Down
1 change: 0 additions & 1 deletion nncf/quantization/algorithms/min_max/onnx_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
from nncf.quantization.range_estimator import RangeEstimatorParameters


@ALGO_BACKENDS.register(BackendType.ONNX)
class ONNXMinMaxAlgoBackend(MinMaxAlgoBackend):
@property
def mat_mul_metatypes(self) -> List[OperatorMetatype]:
Expand Down
1 change: 0 additions & 1 deletion nncf/quantization/algorithms/min_max/openvino_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
from nncf.quantization.fake_quantize import FakeQuantizeParameters


@ALGO_BACKENDS.register(BackendType.OPENVINO)
class OVMinMaxAlgoBackend(MinMaxAlgoBackend):
@property
def mat_mul_metatypes(self) -> List[OperatorMetatype]:
Expand Down
1 change: 0 additions & 1 deletion nncf/quantization/algorithms/min_max/torch_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
from nncf.torch.tensor_statistics.statistics import PTMinMaxTensorStatistic


@ALGO_BACKENDS.register(BackendType.TORCH)
class PTMinMaxAlgoBackend(MinMaxAlgoBackend):
TARGET_TYPE_TO_PT_INS_TYPE_MAP = {
TargetType.PRE_LAYER_OPERATION: TargetType.OPERATOR_PRE_HOOK,
Expand Down
2 changes: 1 addition & 1 deletion tests/torch/sparsity/movement/helpers/run_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import torch.nn
import torch.nn.functional as F
import torch.utils.data
from datasets import Dataset
from transformers import AutoModelForAudioClassification
from transformers import AutoModelForImageClassification
from transformers import AutoModelForSequenceClassification
Expand All @@ -33,7 +34,6 @@
from transformers import SwinConfig
from transformers import Wav2Vec2Config

from datasets import Dataset
from nncf import NNCFConfig
from nncf.experimental.torch.sparsity.movement.scheduler import MovementSchedulerParams
from nncf.torch.dynamic_graph.graph_tracer import ModelInputInfo
Expand Down
2 changes: 1 addition & 1 deletion tests/torch/sparsity/movement/helpers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

import numpy as np
import torch
from datasets import Dataset
from transformers import TrainingArguments
from transformers.trainer import Trainer
from transformers.trainer_callback import TrainerCallback
from transformers.trainer_callback import TrainerControl
from transformers.trainer_callback import TrainerState
from transformers.trainer_utils import PREFIX_CHECKPOINT_DIR

from datasets import Dataset
from nncf.api.compression import CompressionAlgorithmController
from nncf.common.compression import BaseCompressionAlgorithmController
from nncf.common.utils.tensorboard import prepare_for_tensorboard
Expand Down
2 changes: 1 addition & 1 deletion tests/torch/sparsity/movement/test_model_saving.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import pytest
import torch
from addict import Dict
from datasets import Dataset
from onnx import numpy_helper
from openvino.runtime import Core
from openvino.runtime import serialize
Expand All @@ -28,7 +29,6 @@
from scipy.special import softmax
from transformers.trainer_utils import PREFIX_CHECKPOINT_DIR

from datasets import Dataset
from nncf.torch import create_compressed_model
from nncf.torch.checkpoint_loading import load_state
from tests.torch.helpers import PTTensorListComparator
Expand Down
3 changes: 1 addition & 2 deletions tests/torch/sparsity/movement/training_scripts/run_glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
from pathlib import Path
from typing import Dict, List, Optional, Tuple

import datasets
import evaluate
import jstyleson
import numpy as np
from transformers.training_args import ParallelMode

import datasets

# isort: off
from nncf import NNCFConfig
from nncf.api.compression import CompressionAlgorithmController
Expand Down

0 comments on commit d17f8ee

Please sign in to comment.