diff --git a/examples/experimental/openvino/bert/main.py b/examples/experimental/openvino/bert/main.py index 34dd31094b5..ea7a3772430 100644 --- a/examples/experimental/openvino/bert/main.py +++ b/examples/experimental/openvino/bert/main.py @@ -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 diff --git a/tests/torch/sparsity/movement/helpers/run_recipe.py b/tests/torch/sparsity/movement/helpers/run_recipe.py index c7878ce4564..261cc1268b7 100644 --- a/tests/torch/sparsity/movement/helpers/run_recipe.py +++ b/tests/torch/sparsity/movement/helpers/run_recipe.py @@ -20,6 +20,7 @@ import torch.nn import torch.nn.functional as F import torch.utils.data +from datasets import Dataset # pylint: disable=no-name-in-module from transformers import AutoModelForAudioClassification from transformers import AutoModelForImageClassification from transformers import AutoModelForSequenceClassification @@ -33,7 +34,6 @@ from transformers import SwinConfig from transformers import Wav2Vec2Config -from datasets import Dataset # pylint: disable=no-name-in-module from nncf import NNCFConfig from nncf.experimental.torch.sparsity.movement.scheduler import MovementSchedulerParams from nncf.torch.dynamic_graph.graph_tracer import ModelInputInfo diff --git a/tests/torch/sparsity/movement/helpers/trainer.py b/tests/torch/sparsity/movement/helpers/trainer.py index 63e62f5e0db..7da241bf712 100644 --- a/tests/torch/sparsity/movement/helpers/trainer.py +++ b/tests/torch/sparsity/movement/helpers/trainer.py @@ -14,6 +14,7 @@ import numpy as np import torch +from datasets import Dataset # pylint: disable=no-name-in-module from transformers import TrainingArguments from transformers.trainer import Trainer from transformers.trainer_callback import TrainerCallback @@ -21,7 +22,6 @@ from transformers.trainer_callback import TrainerState from transformers.trainer_utils import PREFIX_CHECKPOINT_DIR -from datasets import Dataset # pylint: disable=no-name-in-module from nncf.api.compression import CompressionAlgorithmController from nncf.common.compression import BaseCompressionAlgorithmController from nncf.common.utils.tensorboard import prepare_for_tensorboard diff --git a/tests/torch/sparsity/movement/test_model_saving.py b/tests/torch/sparsity/movement/test_model_saving.py index 4fc6ee4d044..c20a5cc6255 100644 --- a/tests/torch/sparsity/movement/test_model_saving.py +++ b/tests/torch/sparsity/movement/test_model_saving.py @@ -18,6 +18,7 @@ import pytest import torch from addict import Dict +from datasets import Dataset # pylint: disable=no-name-in-module from onnx import numpy_helper from openvino.runtime import Core from openvino.runtime import serialize @@ -28,7 +29,6 @@ from scipy.special import softmax from transformers.trainer_utils import PREFIX_CHECKPOINT_DIR -from datasets import Dataset # pylint: disable=no-name-in-module from nncf.torch import create_compressed_model from nncf.torch.checkpoint_loading import load_state from tests.torch.helpers import PTTensorListComparator diff --git a/tests/torch/sparsity/movement/training_scripts/run_glue.py b/tests/torch/sparsity/movement/training_scripts/run_glue.py index de6735e011d..09a6bf6c737 100644 --- a/tests/torch/sparsity/movement/training_scripts/run_glue.py +++ b/tests/torch/sparsity/movement/training_scripts/run_glue.py @@ -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