[Refactor] Relative imports wherever we can (#21880)
* initial commit * update * second batch * style * fix imports * fix relative import on pipeline
This commit is contained in:
@@ -2,7 +2,7 @@ import numpy as np
|
||||
import torch
|
||||
from torch.utils.data import Dataset, IterableDataset
|
||||
|
||||
from transformers.utils.generic import ModelOutput
|
||||
from ..utils.generic import ModelOutput
|
||||
|
||||
|
||||
class PipelineDataset(Dataset):
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import enum
|
||||
import warnings
|
||||
|
||||
from transformers import MODEL_FOR_CAUSAL_LM_MAPPING, TF_MODEL_FOR_CAUSAL_LM_MAPPING
|
||||
|
||||
from .. import MODEL_FOR_CAUSAL_LM_MAPPING, TF_MODEL_FOR_CAUSAL_LM_MAPPING
|
||||
from ..utils import add_end_docstrings, is_tf_available
|
||||
from .base import PIPELINE_INIT_ARGS, Pipeline
|
||||
|
||||
|
||||
Reference in New Issue
Block a user