From 4077d51ebeb4bb619084377233e3468fb23c9d59 Mon Sep 17 00:00:00 2001 From: tboquet Date: Tue, 19 Sep 2023 09:59:24 -0400 Subject: [PATCH] fix: import module level --- src/tasknet/utils.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/tasknet/utils.py b/src/tasknet/utils.py index 0b44f36..f6a8214 100755 --- a/src/tasknet/utils.py +++ b/src/tasknet/utils.py @@ -1,12 +1,17 @@ -from datasets import DatasetDict, Dataset, load_dataset -from easydict import EasyDict as edict import copy import functools -from tqdm.auto import tqdm -from datasets import concatenate_datasets + import funcy as fc -import torch import magicattr +import torch +from datasets import Dataset, DatasetDict, concatenate_datasets, load_dataset +from easydict import EasyDict as edict +from tqdm.auto import tqdm +from transformers import ( + AutoModelForSequenceClassification, + AutoTokenizer, + TextClassificationPipeline, +) class NoTqdm: @@ -184,11 +189,6 @@ def load_pipeline( if multilingual or "mdeberta" in model_name: multilingual = True - from transformers import ( - AutoModelForSequenceClassification, - TextClassificationPipeline, - AutoTokenizer, - ) from .models import Adapter try: