diff --git a/src/setfit/modeling.py b/src/setfit/modeling.py index 02330e97..bb897611 100644 --- a/src/setfit/modeling.py +++ b/src/setfit/modeling.py @@ -5,6 +5,7 @@ from pathlib import Path from typing import Dict, List, Optional, Set, Tuple, Union + # For Python 3.7 compatibility try: from typing import Literal @@ -18,8 +19,9 @@ from huggingface_hub import ModelHubMixin, hf_hub_download from huggingface_hub.utils import validate_hf_hub_args from packaging.version import Version, parse -from sentence_transformers import SentenceTransformer, models +from sentence_transformers import SentenceTransformer from sentence_transformers import __version__ as sentence_transformers_version +from sentence_transformers import models from sklearn.linear_model import LogisticRegression from sklearn.multiclass import OneVsRestClassifier from sklearn.multioutput import ClassifierChain, MultiOutputClassifier @@ -33,6 +35,7 @@ from .model_card import SetFitModelCardData, generate_model_card from .utils import set_docstring + logging.set_verbosity_info() logger = logging.get_logger(__name__) diff --git a/src/setfit/span/modeling.py b/src/setfit/span/modeling.py index cd3f312d..91e7942c 100644 --- a/src/setfit/span/modeling.py +++ b/src/setfit/span/modeling.py @@ -18,6 +18,7 @@ from ..modeling import SetFitModel from .aspect_extractor import AspectExtractor + if TYPE_CHECKING: from spacy.tokens import Doc