id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6,500 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/tokenization_utils_base.py | transformers.tokenization_utils_base.SpecialTokensMixin | from collections.abc import Mapping, Sequence, Sized
from typing import TYPE_CHECKING, Any, Callable, NamedTuple, Optional, Union
class SpecialTokensMixin:
"""
A mixin derived by [`PreTrainedTokenizer`] and [`PreTrainedTokenizerFast`] to handle specific behaviors related to
special tokens. In particular, t... |
class SpecialTokensMixin:
'''
A mixin derived by [`PreTrainedTokenizer`] and [`PreTrainedTokenizerFast`] to handle specific behaviors related to
special tokens. In particular, this class hold the attributes which can be used to directly access these special
tokens in a model-independent manner and allo... | 21 | 11 | 22 | 3 | 11 | 8 | 4 | 0.83 | 0 | 13 | 0 | 1 | 14 | 3 | 14 | 14 | 367 | 55 | 171 | 55 | 146 | 142 | 131 | 45 | 116 | 13 | 0 | 4 | 58 |
6,501 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/tokenization_utils_base.py | transformers.tokenization_utils_base.TokenSpan | from typing import TYPE_CHECKING, Any, Callable, NamedTuple, Optional, Union
class TokenSpan(NamedTuple):
"""
Token span in an encoded string (list of tokens).
Args:
start (`int`): Index of the first token in the span.
end (`int`): Index of the token following the last token in the span.
... |
class TokenSpan(NamedTuple):
'''
Token span in an encoded string (list of tokens).
Args:
start (`int`): Index of the first token in the span.
end (`int`): Index of the token following the last token in the span.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 3 | 1 | 2 | 6 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
6,502 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/tokenization_utils_base.py | transformers.tokenization_utils_base.TruncationStrategy | from .utils import CHAT_TEMPLATE_DIR, CHAT_TEMPLATE_FILE, ExplicitEnum, PaddingStrategy, PushToHubMixin, TensorType, add_end_docstrings, cached_file, copy_func, download_url, extract_commit_hash, is_mlx_available, is_numpy_array, is_offline_mode, is_protobuf_available, is_remote_url, is_tokenizers_available, is_torch_a... |
class TruncationStrategy(ExplicitEnum):
'''
Possible values for the `truncation` argument in [`PreTrainedTokenizerBase.__call__`]. Useful for tab-completion in
an IDE.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 5 | 5 | 4 | 4 | 5 | 5 | 4 | 0 | 1 | 0 | 0 |
6,503 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/tokenization_utils_fast.py | transformers.tokenization_utils_fast.PreTrainedTokenizerFast | from tokenizers import Encoding as EncodingFast
from tokenizers import Tokenizer as TokenizerFast
import tokenizers.pre_tokenizers as pre_tokenizers_fast
import os
from .integrations.ggml import convert_gguf_tokenizer
from .tokenization_utils import PreTrainedTokenizer
from tokenizers.decoders import Decoder as Decoder... | @add_end_docstrings(INIT_TOKENIZER_DOCSTRING)
class PreTrainedTokenizerFast(PreTrainedTokenizerBase):
'''
Base class for all fast tokenizers (wrapping HuggingFace tokenizers library).
Inherits from [`~tokenization_utils_base.PreTrainedTokenizerBase`].
Handles all the shared methods for tokenization and ... | 38 | 17 | 29 | 3 | 20 | 6 | 4 | 0.3 | 1 | 15 | 2 | 58 | 27 | 5 | 27 | 88 | 827 | 103 | 558 | 202 | 438 | 166 | 314 | 108 | 286 | 32 | 2 | 5 | 119 |
6,504 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer.py | transformers.trainer.Trainer | from .tokenization_utils_base import PreTrainedTokenizerBase
from pathlib import Path
from .pytorch_utils import is_torch_greater_or_equal_than_2_3
from functools import partial
from .processing_utils import ProcessorMixin
from torch.utils.data import DataLoader, Dataset, IterableDataset, RandomSampler, SequentialSampl... | null | 106 | 59 | 52 | 6 | 37 | 8 | 9 | 0.24 | 0 | 94 | 41 | 2 | 83 | 57 | 85 | 85 | 4,852 | 649 | 3,384 | 690 | 3,159 | 826 | 2,235 | 571 | 2,109 | 81 | 0 | 7 | 862 |
6,505 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_callback.py | transformers.trainer_callback.CallbackHandler | from .training_args import TrainingArguments
class CallbackHandler(TrainerCallback):
"""Internal class that just calls the list of callbacks in order."""
def __init__(self, callbacks, model, processing_class, optimizer, lr_scheduler):
self.callbacks = []
for cb in callbacks:
self.a... |
class CallbackHandler(TrainerCallback):
'''Internal class that just calls the list of callbacks in order.'''
def __init__(self, callbacks, model, processing_class, optimizer, lr_scheduler):
pass
def add_callback(self, callback):
pass
def pop_callback(self, callback):
pass
... | 23 | 1 | 5 | 0 | 5 | 0 | 2 | 0.02 | 1 | 5 | 4 | 0 | 21 | 7 | 21 | 36 | 129 | 22 | 105 | 37 | 82 | 2 | 82 | 36 | 60 | 6 | 1 | 3 | 36 |
6,506 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_callback.py | transformers.trainer_callback.DefaultFlowCallback | from .training_args import TrainingArguments
from .trainer_utils import HPSearchBackend, IntervalStrategy, SaveStrategy, has_length
class DefaultFlowCallback(TrainerCallback):
"""
A [`TrainerCallback`] that handles the default flow of the training loop for logs, evaluation and checkpoints.
"""
def on_... |
class DefaultFlowCallback(TrainerCallback):
'''
A [`TrainerCallback`] that handles the default flow of the training loop for logs, evaluation and checkpoints.
'''
def on_step_end(self, args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs):
pass
def on_epoch_... | 3 | 1 | 23 | 4 | 15 | 4 | 6 | 0.35 | 1 | 5 | 5 | 0 | 2 | 0 | 2 | 17 | 51 | 9 | 31 | 3 | 28 | 11 | 23 | 3 | 20 | 7 | 1 | 2 | 11 |
6,507 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_callback.py | transformers.trainer_callback.EarlyStoppingCallback | from .trainer_utils import HPSearchBackend, IntervalStrategy, SaveStrategy, has_length
import numpy as np
from typing import Optional, Union
class EarlyStoppingCallback(TrainerCallback, ExportableState):
"""
A [`TrainerCallback`] that handles early stopping.
Args:
early_stopping_patience (`int`):
... |
class EarlyStoppingCallback(TrainerCallback, ExportableState):
'''
A [`TrainerCallback`] that handles early stopping.
Args:
early_stopping_patience (`int`):
Use with `metric_for_best_model` to stop training when the specified metric worsens for
`early_stopping_patience` eval... | 6 | 1 | 11 | 0 | 10 | 0 | 2 | 0.3 | 2 | 4 | 1 | 0 | 5 | 3 | 5 | 22 | 74 | 9 | 50 | 12 | 44 | 15 | 28 | 12 | 22 | 4 | 1 | 1 | 11 |
6,508 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_callback.py | transformers.trainer_callback.ExportableState | class ExportableState:
"""
A class for objects that include the ability to have its state
be saved during `Trainer._save_checkpoint` and loaded back in during
`Trainer._load_from_checkpoint`.
These must implement a `state` function that gets called during the respective
Trainer function call. I... | class ExportableState:
'''
A class for objects that include the ability to have its state
be saved during `Trainer._save_checkpoint` and loaded back in during
`Trainer._load_from_checkpoint`.
These must implement a `state` function that gets called during the respective
Trainer function call. It... | 4 | 1 | 4 | 0 | 4 | 0 | 2 | 3 | 0 | 2 | 0 | 2 | 1 | 0 | 2 | 2 | 42 | 6 | 9 | 6 | 5 | 27 | 8 | 5 | 5 | 2 | 0 | 1 | 3 |
6,509 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_callback.py | transformers.trainer_callback.PrinterCallback | class PrinterCallback(TrainerCallback):
"""
A bare [`TrainerCallback`] that just prints the logs.
"""
def on_log(self, args, state, control, logs=None, **kwargs):
_ = logs.pop('total_flos', None)
if state.is_local_process_zero:
print(logs) | class PrinterCallback(TrainerCallback):
'''
A bare [`TrainerCallback`] that just prints the logs.
'''
def on_log(self, args, state, control, logs=None, **kwargs):
pass | 2 | 1 | 4 | 0 | 4 | 0 | 2 | 0.6 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 16 | 9 | 1 | 5 | 3 | 3 | 3 | 5 | 3 | 3 | 2 | 1 | 1 | 2 |
6,510 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_callback.py | transformers.trainer_callback.ProgressCallback | from .trainer_utils import HPSearchBackend, IntervalStrategy, SaveStrategy, has_length
from tqdm.auto import tqdm
class ProgressCallback(TrainerCallback):
"""
A [`TrainerCallback`] that displays the progress of training or evaluation.
You can modify `max_str_len` to control how long strings are truncated w... |
class ProgressCallback(TrainerCallback):
'''
A [`TrainerCallback`] that displays the progress of training or evaluation.
You can modify `max_str_len` to control how long strings are truncated when logging.
'''
def __init__(self, max_str_len: int=100):
'''
Initialize the callback wi... | 9 | 2 | 7 | 0 | 6 | 1 | 3 | 0.29 | 1 | 2 | 0 | 0 | 8 | 4 | 8 | 23 | 72 | 9 | 49 | 16 | 40 | 14 | 43 | 16 | 34 | 5 | 1 | 3 | 21 |
6,511 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_callback.py | transformers.trainer_callback.TrainerCallback | from .training_args import TrainingArguments
class TrainerCallback:
"""
A class for objects that will inspect the state of the training loop at some events and take some decisions. At
each of those events the following arguments are available:
Args:
args ([`TrainingArguments`]):
Th... |
class TrainerCallback:
'''
A class for objects that will inspect the state of the training loop at some events and take some decisions. At
each of those events the following arguments are available:
Args:
args ([`TrainingArguments`]):
The training arguments used to instantiate the [... | 16 | 16 | 5 | 0 | 2 | 3 | 1 | 2.94 | 0 | 3 | 3 | 16 | 15 | 0 | 15 | 15 | 144 | 22 | 31 | 16 | 15 | 91 | 31 | 16 | 15 | 1 | 0 | 0 | 15 |
6,512 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_callback.py | transformers.trainer_callback.TrainerControl | from dataclasses import dataclass
@dataclass
class TrainerControl(ExportableState):
"""
A class that handles the [`Trainer`] control flow. This class is used by the [`TrainerCallback`] to activate some
switches in the training loop.
Args:
should_training_stop (`bool`, *optional*, defaults to `... | @dataclass
class TrainerControl(ExportableState):
'''
A class that handles the [`Trainer`] control flow. This class is used by the [`TrainerCallback`] to activate some
switches in the training loop.
Args:
should_training_stop (`bool`, *optional*, defaults to `False`):
Whether or not ... | 6 | 4 | 6 | 0 | 5 | 1 | 1 | 0.92 | 1 | 1 | 0 | 0 | 4 | 0 | 4 | 6 | 59 | 11 | 25 | 10 | 20 | 23 | 16 | 10 | 11 | 1 | 1 | 0 | 4 |
6,513 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_callback.py | transformers.trainer_callback.TrainerState | import math
from .trainer_utils import HPSearchBackend, IntervalStrategy, SaveStrategy, has_length
import dataclasses
import json
from dataclasses import dataclass
from typing import Optional, Union
@dataclass
class TrainerState:
"""
A class containing the [`Trainer`] inner state that will be saved along the m... | @dataclass
class TrainerState:
'''
A class containing the [`Trainer`] inner state that will be saved along the model and optimizer when checkpointing
and passed to the [`TrainerCallback`].
<Tip>
In all this class, one step is to be understood as one update step. When using gradient accumulation, one... | 8 | 5 | 14 | 1 | 10 | 3 | 4 | 0.92 | 0 | 7 | 2 | 0 | 4 | 1 | 5 | 5 | 153 | 13 | 73 | 39 | 65 | 67 | 67 | 36 | 60 | 8 | 0 | 4 | 19 |
6,514 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_pt_utils.py | transformers.trainer_pt_utils.AcceleratorConfig | from typing import Any, Optional, Union
import json
import os
from dataclasses import dataclass, field
import copy
import io
@dataclass
class AcceleratorConfig:
"""
A subset of arguments relating to the underlying [`accelerate.Accelerator`]
implementation utilized in the `Trainer` that can be customized.
... | @dataclass
class AcceleratorConfig:
'''
A subset of arguments relating to the underlying [`accelerate.Accelerator`]
implementation utilized in the `Trainer` that can be customized.
Mostly relating to data.
Parameters:
split_batches (`bool`, *optional*, defaults to `False`):
Wheth... | 6 | 1 | 6 | 0 | 5 | 1 | 2 | 0.55 | 0 | 1 | 0 | 0 | 2 | 0 | 3 | 3 | 132 | 8 | 80 | 16 | 75 | 44 | 20 | 14 | 16 | 3 | 0 | 1 | 5 |
6,515 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_pt_utils.py | transformers.trainer_pt_utils.DistributedLengthGroupedSampler | from typing import Any, Optional, Union
from .tokenization_utils_base import BatchEncoding
import torch
from torch.utils.data import Dataset, IterableDataset, RandomSampler, Sampler
from torch.utils.data.distributed import DistributedSampler
import math
import torch.distributed as dist
from collections.abc import Itera... |
class DistributedLengthGroupedSampler(DistributedSampler):
'''
Distributed Sampler that samples indices in a way that groups together features of the dataset of roughly the same
length while keeping a bit of randomness.
'''
def __init__(self, batch_size: int, dataset: Optional[Dataset]=None, num_r... | 3 | 1 | 39 | 4 | 31 | 5 | 7 | 0.22 | 1 | 8 | 1 | 0 | 2 | 9 | 2 | 10 | 86 | 9 | 63 | 24 | 50 | 14 | 41 | 14 | 38 | 11 | 3 | 2 | 13 |
6,516 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_pt_utils.py | transformers.trainer_pt_utils.DistributedSamplerWithLoop | from torch.utils.data.distributed import DistributedSampler
class DistributedSamplerWithLoop(DistributedSampler):
"""
Like a torch.utils.data.distributed.DistributedSampler` but loops at the end back to the beginning of the shuffled
samples to make each process have a round multiple of batch_size samples.
... |
class DistributedSamplerWithLoop(DistributedSampler):
'''
Like a torch.utils.data.distributed.DistributedSampler` but loops at the end back to the beginning of the shuffled
samples to make each process have a round multiple of batch_size samples.
Args:
dataset (`torch.utils.data.Dataset`):
... | 3 | 1 | 6 | 0 | 5 | 1 | 2 | 1.3 | 1 | 2 | 0 | 0 | 2 | 1 | 2 | 10 | 26 | 3 | 10 | 7 | 7 | 13 | 10 | 7 | 7 | 3 | 3 | 0 | 4 |
6,517 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_pt_utils.py | transformers.trainer_pt_utils.DistributedTensorGatherer | import warnings
import numpy as np
class DistributedTensorGatherer:
"""
A class responsible for properly gathering tensors (or nested list/tuple of tensors) on the CPU by chunks.
If our dataset has 16 samples with a batch size of 2 on 3 processes and we gather then transfer on CPU at every
step, our s... |
class DistributedTensorGatherer:
'''
A class responsible for properly gathering tensors (or nested list/tuple of tensors) on the CPU by chunks.
If our dataset has 16 samples with a batch size of 2 on 3 processes and we gather then transfer on CPU at every
step, our sampler will generate the following i... | 5 | 3 | 14 | 1 | 12 | 2 | 4 | 0.87 | 0 | 7 | 0 | 0 | 4 | 7 | 4 | 4 | 106 | 18 | 47 | 18 | 42 | 41 | 39 | 18 | 34 | 5 | 0 | 3 | 14 |
6,518 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_pt_utils.py | transformers.trainer_pt_utils.EvalLoopContainer | class EvalLoopContainer:
"""
Container to store intermediate results of evaluation loop.
Args:
do_nested_concat (`bool`, *optional*, defaults to `True`):
If set to `True`, each iteration will recursively concatenate a new object containing tensors to
the existing stored tens... | class EvalLoopContainer:
'''
Container to store intermediate results of evaluation loop.
Args:
do_nested_concat (`bool`, *optional*, defaults to `True`):
If set to `True`, each iteration will recursively concatenate a new object containing tensors to
the existing stored tenso... | 5 | 4 | 9 | 1 | 7 | 1 | 3 | 0.56 | 0 | 2 | 0 | 0 | 4 | 4 | 4 | 4 | 50 | 8 | 27 | 10 | 22 | 15 | 23 | 10 | 18 | 4 | 0 | 1 | 10 |
6,519 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_pt_utils.py | transformers.trainer_pt_utils.IterableDatasetShard | from torch.utils.data import Dataset, IterableDataset, RandomSampler, Sampler
import math
import torch
import torch.distributed as dist
class IterableDatasetShard(IterableDataset):
"""
Wraps a PyTorch `IterableDataset` to generate samples for one of the processes only. Instances of this class will
always y... |
class IterableDatasetShard(IterableDataset):
'''
Wraps a PyTorch `IterableDataset` to generate samples for one of the processes only. Instances of this class will
always yield a number of samples that is a round multiple of the actual batch size (which is `batch_size x
num_processes`). Depending on the... | 5 | 1 | 15 | 1 | 14 | 1 | 4 | 0.65 | 1 | 3 | 0 | 0 | 4 | 8 | 4 | 9 | 103 | 12 | 55 | 27 | 42 | 36 | 42 | 19 | 37 | 10 | 3 | 3 | 15 |
6,520 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_pt_utils.py | transformers.trainer_pt_utils.LabelSmoother | import torch.distributed as dist
from dataclasses import dataclass, field
import torch
from torch import nn
@dataclass
class LabelSmoother:
"""
Adds label-smoothing on a pre-computed output from a Transformers model.
Args:
epsilon (`float`, *optional*, defaults to 0.1):
The label smoot... | @dataclass
class LabelSmoother:
'''
Adds label-smoothing on a pre-computed output from a Transformers model.
Args:
epsilon (`float`, *optional*, defaults to 0.1):
The label smoothing factor.
ignore_index (`int`, *optional*, defaults to -100):
The index in the labels t... | 3 | 1 | 26 | 4 | 18 | 4 | 4 | 0.57 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 40 | 7 | 21 | 10 | 19 | 12 | 21 | 10 | 19 | 4 | 0 | 1 | 4 |
6,521 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_pt_utils.py | transformers.trainer_pt_utils.LayerWiseDummyOptimizer | import torch
import torch.distributed as dist
from typing import Any, Optional, Union
class LayerWiseDummyOptimizer(torch.optim.Optimizer):
"""
For Layer-wise optimizers such as GaLoRE optimizer, the optimization
step is already done through the post gradient hooks. Therefore
the trick is to create a d... |
class LayerWiseDummyOptimizer(torch.optim.Optimizer):
'''
For Layer-wise optimizers such as GaLoRE optimizer, the optimization
step is already done through the post gradient hooks. Therefore
the trick is to create a dummy optimizer that can take arbitrary
args and kwargs and return a no-op during t... | 4 | 1 | 3 | 0 | 3 | 0 | 1 | 0.89 | 0 | 3 | 0 | 0 | 3 | 1 | 3 | 3 | 21 | 4 | 9 | 6 | 5 | 8 | 9 | 6 | 5 | 1 | 0 | 0 | 3 |
6,522 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_pt_utils.py | transformers.trainer_pt_utils.LayerWiseDummyScheduler | from itertools import chain
class LayerWiseDummyScheduler(LRScheduler):
"""
For Layer-wise optimizers such as GaLoRE optimizer, the optimization and scheduling step
are already done through the post gradient hooks. Therefore
the trick is to create a dummy scheduler that can take arbitrary
args and ... |
class LayerWiseDummyScheduler(LRScheduler):
'''
For Layer-wise optimizers such as GaLoRE optimizer, the optimization and scheduling step
are already done through the post gradient hooks. Therefore
the trick is to create a dummy scheduler that can take arbitrary
args and kwargs and return a no-op du... | 4 | 1 | 7 | 1 | 5 | 1 | 1 | 0.47 | 1 | 4 | 1 | 0 | 3 | 1 | 3 | 11 | 30 | 5 | 17 | 10 | 13 | 8 | 15 | 10 | 11 | 2 | 1 | 1 | 4 |
6,523 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_pt_utils.py | transformers.trainer_pt_utils.LengthGroupedSampler | from .tokenization_utils_base import BatchEncoding
import torch
from torch.utils.data import Dataset, IterableDataset, RandomSampler, Sampler
import torch.distributed as dist
from typing import Any, Optional, Union
class LengthGroupedSampler(Sampler):
"""
Sampler that samples indices in a way that groups toget... |
class LengthGroupedSampler(Sampler):
'''
Sampler that samples indices in a way that groups together features of the dataset of roughly the same length while
keeping a bit of randomness.
'''
def __init__(self, batch_size: int, dataset: Optional[Dataset]=None, lengths: Optional[list[int]]=None, mode... | 4 | 1 | 12 | 1 | 11 | 0 | 3 | 0.11 | 1 | 6 | 1 | 0 | 3 | 3 | 3 | 7 | 44 | 5 | 35 | 15 | 24 | 4 | 19 | 8 | 15 | 6 | 2 | 2 | 8 |
6,524 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_pt_utils.py | transformers.trainer_pt_utils.SequentialDistributedSampler | import warnings
import math
from torch.utils.data import Dataset, IterableDataset, RandomSampler, Sampler
import torch.distributed as dist
class SequentialDistributedSampler(Sampler):
"""
Distributed Sampler that subsamples indices sequentially, making it easier to collate all results at the end.
Even tho... |
class SequentialDistributedSampler(Sampler):
'''
Distributed Sampler that subsamples indices sequentially, making it easier to collate all results at the end.
Even though we only use this sampler for eval and predict (no training), which means that the model params won't
have to be synced (i.e. will no... | 4 | 1 | 14 | 1 | 12 | 1 | 3 | 0.27 | 1 | 5 | 0 | 0 | 3 | 6 | 3 | 7 | 54 | 7 | 37 | 12 | 33 | 10 | 29 | 12 | 25 | 6 | 2 | 2 | 8 |
6,525 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_pt_utils.py | transformers.trainer_pt_utils.ShardSampler | from torch.utils.data import Dataset, IterableDataset, RandomSampler, Sampler
import math
class ShardSampler(Sampler):
"""
Sampler that shards batches between several processes. Dispatches indices batch by batch: on 2 processes with batch
size 4, the first two batches are `[0, 1, 2, 3, 4, 5, 6, 7]` and `[8... |
class ShardSampler(Sampler):
'''
Sampler that shards batches between several processes. Dispatches indices batch by batch: on 2 processes with batch
size 4, the first two batches are `[0, 1, 2, 3, 4, 5, 6, 7]` and `[8, 9, 10, 11, 12, 13, 14, 15]`, which shard into
`[0, 1, 2, 3]` and `[8, 9, 10, 11]` fo... | 4 | 1 | 11 | 2 | 9 | 1 | 2 | 0.33 | 1 | 4 | 0 | 0 | 3 | 7 | 3 | 7 | 45 | 9 | 27 | 22 | 16 | 9 | 20 | 15 | 16 | 3 | 2 | 1 | 6 |
6,526 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_seq2seq.py | transformers.trainer_seq2seq.Seq2SeqTrainer | from torch.utils.data import Dataset
from .trainer import Trainer
from pathlib import Path
import contextlib
from typing import TYPE_CHECKING, Any, Callable, Optional, Union
from .integrations.deepspeed import is_deepspeed_zero3_enabled
from .integrations.fsdp import is_fsdp_managed_module
from copy import deepcopy
fro... |
class Seq2SeqTrainer(Trainer):
@deprecate_kwarg('tokenizer', new_name='processing_class', version='5.0.0', raise_if_both_names=True)
def __init__(self, model: Optional[Union['PreTrainedModel', nn.Module]]=None, args: Optional['TrainingArguments']=None, data_collator: Optional['DataCollator']=None, train_datas... | 9 | 4 | 55 | 7 | 30 | 18 | 6 | 0.6 | 1 | 14 | 1 | 0 | 5 | 2 | 6 | 91 | 339 | 46 | 183 | 63 | 139 | 110 | 94 | 24 | 87 | 17 | 1 | 3 | 36 |
6,527 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_utils.py | transformers.trainer_utils.BestRun | from typing import Any, NamedTuple, Optional, Union
class BestRun(NamedTuple):
"""
The best run found by a hyperparameter search (see [`~Trainer.hyperparameter_search`]).
Parameters:
run_id (`str`):
The id of the best run (if models were saved, the corresponding checkpoint will be in t... |
class BestRun(NamedTuple):
'''
The best run found by a hyperparameter search (see [`~Trainer.hyperparameter_search`]).
Parameters:
run_id (`str`):
The id of the best run (if models were saved, the corresponding checkpoint will be in the folder ending
with run-{run_id}).
... | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2.6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 2 | 5 | 2 | 4 | 13 | 5 | 2 | 4 | 0 | 1 | 0 | 0 |
6,528 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_utils.py | transformers.trainer_utils.EvalLoopOutput | import numpy as np
from typing import Any, NamedTuple, Optional, Union
class EvalLoopOutput(NamedTuple):
predictions: Union[np.ndarray, tuple[np.ndarray]]
label_ids: Optional[Union[np.ndarray, tuple[np.ndarray]]]
metrics: Optional[dict[str, float]]
num_samples: Optional[int] |
class EvalLoopOutput(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 1 | 4 | 0 | 5 | 1 | 4 | 0 | 1 | 0 | 0 |
6,529 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_utils.py | transformers.trainer_utils.EvalPrediction | from typing import Any, NamedTuple, Optional, Union
import numpy as np
class EvalPrediction:
"""
Evaluation output (always contains labels), to be used to compute metrics.
Parameters:
predictions (`np.ndarray`): Predictions of the model.
label_ids (`np.ndarray`): Targets to be matched.
... |
class EvalPrediction:
'''
Evaluation output (always contains labels), to be used to compute metrics.
Parameters:
predictions (`np.ndarray`): Predictions of the model.
label_ids (`np.ndarray`): Targets to be matched.
inputs (`np.ndarray`, *optional*): Input data passed to the model.
... | 4 | 1 | 7 | 0 | 7 | 0 | 2 | 0.35 | 0 | 1 | 0 | 0 | 3 | 5 | 3 | 3 | 35 | 4 | 23 | 15 | 13 | 8 | 17 | 9 | 13 | 3 | 0 | 1 | 6 |
6,530 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_utils.py | transformers.trainer_utils.EvaluationStrategy | from .utils import ExplicitEnum, is_psutil_available, is_torch_available, is_torch_cuda_available, is_torch_hpu_available, is_torch_mlu_available, is_torch_mps_available, is_torch_musa_available, is_torch_npu_available, is_torch_xla_available, is_torch_xpu_available, requires_backends
class EvaluationStrategy(Explicit... |
class EvaluationStrategy(ExplicitEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 1 | 0 | 0 |
6,531 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_utils.py | transformers.trainer_utils.FSDPOption | from .utils import ExplicitEnum, is_psutil_available, is_torch_available, is_torch_cuda_available, is_torch_hpu_available, is_torch_mlu_available, is_torch_mps_available, is_torch_musa_available, is_torch_npu_available, is_torch_xla_available, is_torch_xpu_available, requires_backends
class FSDPOption(ExplicitEnum):
... |
class FSDPOption(ExplicitEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0 | 8 | 8 | 7 | 0 | 8 | 8 | 7 | 0 | 1 | 0 | 0 |
6,532 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_utils.py | transformers.trainer_utils.HPSearchBackend | from .utils import ExplicitEnum, is_psutil_available, is_torch_available, is_torch_cuda_available, is_torch_hpu_available, is_torch_mlu_available, is_torch_mps_available, is_torch_musa_available, is_torch_npu_available, is_torch_xla_available, is_torch_xpu_available, requires_backends
class HPSearchBackend(ExplicitEnu... |
class HPSearchBackend(ExplicitEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 5 | 4 | 0 | 5 | 5 | 4 | 0 | 1 | 0 | 0 |
6,533 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_utils.py | transformers.trainer_utils.HubStrategy | from .utils import ExplicitEnum, is_psutil_available, is_torch_available, is_torch_cuda_available, is_torch_hpu_available, is_torch_mlu_available, is_torch_mps_available, is_torch_musa_available, is_torch_npu_available, is_torch_xla_available, is_torch_xpu_available, requires_backends
class HubStrategy(ExplicitEnum):
... |
class HubStrategy(ExplicitEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 5 | 4 | 0 | 5 | 5 | 4 | 0 | 1 | 0 | 0 |
6,534 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_utils.py | transformers.trainer_utils.IntervalStrategy | from .utils import ExplicitEnum, is_psutil_available, is_torch_available, is_torch_cuda_available, is_torch_hpu_available, is_torch_mlu_available, is_torch_mps_available, is_torch_musa_available, is_torch_npu_available, is_torch_xla_available, is_torch_xpu_available, requires_backends
class IntervalStrategy(ExplicitEn... |
class IntervalStrategy(ExplicitEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 1 | 0 | 0 |
6,535 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_utils.py | transformers.trainer_utils.PredictionOutput | from typing import Any, NamedTuple, Optional, Union
import numpy as np
class PredictionOutput(NamedTuple):
predictions: Union[np.ndarray, tuple[np.ndarray]]
label_ids: Optional[Union[np.ndarray, tuple[np.ndarray]]]
metrics: Optional[dict[str, float]] |
class PredictionOutput(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
6,536 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_utils.py | transformers.trainer_utils.RemoveColumnsCollator | from typing import Any, NamedTuple, Optional, Union
class RemoveColumnsCollator:
"""Wrap the data collator to remove unused columns before they are passed to the collator."""
def __init__(self, data_collator, signature_columns, logger=None, model_name: Optional[str]=None, description: Optional[str]=None):
... |
class RemoveColumnsCollator:
'''Wrap the data collator to remove unused columns before they are passed to the collator.'''
def __init__(self, data_collator, signature_columns, logger=None, model_name: Optional[str]=None, description: Optional[str]=None):
pass
def _remove_columns(self, feature: di... | 4 | 1 | 11 | 0 | 11 | 0 | 2 | 0.03 | 0 | 4 | 0 | 0 | 3 | 6 | 3 | 3 | 37 | 3 | 33 | 19 | 22 | 1 | 21 | 12 | 17 | 5 | 0 | 2 | 7 |
6,537 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_utils.py | transformers.trainer_utils.SaveStrategy | from .utils import ExplicitEnum, is_psutil_available, is_torch_available, is_torch_cuda_available, is_torch_hpu_available, is_torch_mlu_available, is_torch_mps_available, is_torch_musa_available, is_torch_npu_available, is_torch_xla_available, is_torch_xpu_available, requires_backends
class SaveStrategy(ExplicitEnum):... |
class SaveStrategy(ExplicitEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 5 | 4 | 0 | 5 | 5 | 4 | 0 | 1 | 0 | 0 |
6,538 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_utils.py | transformers.trainer_utils.SchedulerType | from .utils import ExplicitEnum, is_psutil_available, is_torch_available, is_torch_cuda_available, is_torch_hpu_available, is_torch_mlu_available, is_torch_mps_available, is_torch_musa_available, is_torch_npu_available, is_torch_xla_available, is_torch_xpu_available, requires_backends
class SchedulerType(ExplicitEnum)... |
class SchedulerType(ExplicitEnum):
'''
Scheduler names for the parameter `lr_scheduler_type` in [`TrainingArguments`].
By default, it uses "linear". Internally, this retrieves `get_linear_schedule_with_warmup` scheduler from [`Trainer`].
Scheduler types:
- "linear" = [`get_linear_schedule_with_w... | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1.36 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 1 | 11 | 11 | 10 | 15 | 11 | 11 | 10 | 0 | 1 | 0 | 0 |
6,539 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_utils.py | transformers.trainer_utils.TrainOutput | from typing import Any, NamedTuple, Optional, Union
class TrainOutput(NamedTuple):
global_step: int
training_loss: float
metrics: dict[str, float] |
class TrainOutput(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
6,540 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/trainer_utils.py | transformers.trainer_utils.TrainerMemoryTracker | from .utils import ExplicitEnum, is_psutil_available, is_torch_available, is_torch_cuda_available, is_torch_hpu_available, is_torch_mlu_available, is_torch_mps_available, is_torch_musa_available, is_torch_npu_available, is_torch_xla_available, is_torch_xpu_available, requires_backends
import threading
import gc
import ... | null | 9 | 7 | 30 | 5 | 21 | 4 | 8 | 0.32 | 0 | 3 | 0 | 0 | 8 | 14 | 8 | 8 | 286 | 51 | 179 | 35 | 165 | 57 | 135 | 35 | 121 | 17 | 0 | 3 | 60 |
6,541 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/training_args.py | transformers.training_args.OptimizerNames | from .utils import ACCELERATE_MIN_VERSION, ExplicitEnum, is_accelerate_available, is_apex_available, is_ipex_available, is_safetensors_available, is_sagemaker_dp_enabled, is_sagemaker_mp_enabled, is_torch_available, is_torch_bf16_gpu_available, is_torch_cuda_available, is_torch_hpu_available, is_torch_mlu_available, is... |
class OptimizerNames(ExplicitEnum):
'''
Stores the acceptable string identifiers for optimizers.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 1 | 40 | 40 | 39 | 4 | 40 | 40 | 39 | 0 | 1 | 0 | 0 |
6,542 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/training_args.py | transformers.training_args.ParallelMode | from enum import Enum
class ParallelMode(Enum):
NOT_PARALLEL = 'not_parallel'
NOT_DISTRIBUTED = 'not_distributed'
DISTRIBUTED = 'distributed'
SAGEMAKER_MODEL_PARALLEL = 'sagemaker_model_parallel'
SAGEMAKER_DATA_PARALLEL = 'sagemaker_data_parallel'
TPU = 'tpu' |
class ParallelMode(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 7 | 0 | 7 | 7 | 6 | 0 | 7 | 7 | 6 | 0 | 4 | 0 | 0 |
6,543 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/training_args.py | transformers.training_args.TrainingArguments | from functools import cached_property
import warnings
from .debug_utils import DebugOption
from .utils import ACCELERATE_MIN_VERSION, ExplicitEnum, is_accelerate_available, is_apex_available, is_ipex_available, is_safetensors_available, is_sagemaker_dp_enabled, is_sagemaker_mp_enabled, is_torch_available, is_torch_bf16... | null | 49 | 30 | 47 | 5 | 28 | 14 | 7 | 0.61 | 0 | 32 | 10 | 3 | 32 | 4 | 32 | 32 | 2,865 | 275 | 1,605 | 309 | 1,474 | 987 | 714 | 214 | 676 | 131 | 0 | 4 | 239 |
6,544 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/training_args_seq2seq.py | transformers.training_args_seq2seq.Seq2SeqTrainingArguments | from dataclasses import dataclass, field
from .generation.configuration_utils import GenerationConfig
from .utils import add_start_docstrings
from pathlib import Path
from .training_args import TrainingArguments
from typing import Optional, Union
@dataclass
@add_start_docstrings(TrainingArguments.__doc__)
class Seq2Se... | @dataclass
@add_start_docstrings(TrainingArguments.__doc__)
class Seq2SeqTrainingArguments(TrainingArguments):
'''
Args:
predict_with_generate (`bool`, *optional*, defaults to `False`):
Whether to use generate to calculate generative metrics (ROUGE, BLEU).
generation_max_length (`int... | 4 | 2 | 11 | 0 | 6 | 5 | 3 | 0.66 | 1 | 2 | 1 | 0 | 1 | 0 | 1 | 33 | 61 | 3 | 35 | 9 | 33 | 23 | 12 | 9 | 10 | 3 | 1 | 2 | 3 |
6,545 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/backbone_utils.py | transformers.utils.backbone_utils.BackboneConfigMixin | from typing import TYPE_CHECKING, Optional, Union
class BackboneConfigMixin:
"""
A Mixin to support handling the `out_features` and `out_indices` attributes for the backbone configurations.
"""
@property
def out_features(self):
return self._out_features
@out_features.setter
def ou... |
class BackboneConfigMixin:
'''
A Mixin to support handling the `out_features` and `out_indices` attributes for the backbone configurations.
'''
@property
def out_features(self):
pass
@out_features.setter
def out_features(self):
'''
Set the out_features attribute. Thi... | 10 | 4 | 5 | 0 | 3 | 2 | 1 | 0.59 | 0 | 3 | 0 | 19 | 5 | 2 | 5 | 5 | 40 | 5 | 22 | 12 | 12 | 13 | 14 | 8 | 8 | 1 | 0 | 0 | 5 |
6,546 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/backbone_utils.py | transformers.utils.backbone_utils.BackboneMixin | from typing import TYPE_CHECKING, Optional, Union
import inspect
class BackboneMixin:
backbone_type: Optional[BackboneType] = None
has_attentions: bool = True
def _init_timm_backbone(self, config) -> None:
"""
Initialize the backbone model from timm The backbone must already be loaded to s... |
class BackboneMixin:
def _init_timm_backbone(self, config) -> None:
'''
Initialize the backbone model from timm The backbone must already be loaded to self._backbone
'''
pass
def _init_transformers_backbone(self, config) -> None:
pass
def _init_backbone(self, conf... | 19 | 5 | 8 | 1 | 5 | 2 | 1 | 0.37 | 0 | 10 | 1 | 19 | 12 | 6 | 12 | 12 | 115 | 18 | 71 | 39 | 46 | 26 | 49 | 27 | 36 | 4 | 0 | 1 | 16 |
6,547 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/backbone_utils.py | transformers.utils.backbone_utils.BackboneType | import enum
class BackboneType(enum.Enum):
TIMM = 'timm'
TRANSFORMERS = 'transformers' |
class BackboneType(enum.Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 3 | 2 | 0 | 4 | 0 | 0 |
6,548 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/chat_template_utils.py | transformers.utils.chat_template_utils.DocstringParsingException | class DocstringParsingException(Exception):
"""Exception raised for errors in parsing docstrings to generate JSON schemas"""
pass | class DocstringParsingException(Exception):
'''Exception raised for errors in parsing docstrings to generate JSON schemas'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
6,549 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/chat_template_utils.py | transformers.utils.chat_template_utils.TypeHintParsingException | class TypeHintParsingException(Exception):
"""Exception raised for errors in parsing type hints to generate JSON schemas"""
pass | class TypeHintParsingException(Exception):
'''Exception raised for errors in parsing type hints to generate JSON schemas'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
6,550 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/deprecation.py | transformers.utils.deprecation.Action | from . import ExplicitEnum, is_torch_available, is_torchdynamo_compiling
class Action(ExplicitEnum):
NONE = 'none'
NOTIFY = 'notify'
NOTIFY_ALWAYS = 'notify_always'
RAISE = 'raise' |
class Action(ExplicitEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 5 | 4 | 0 | 5 | 5 | 4 | 0 | 1 | 0 | 0 |
6,551 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_detectron2_objects.py | transformers.utils.dummy_detectron2_objects.LayoutLMv2Model | from ..utils import requires_backends
class LayoutLMv2Model:
def __init__(self, *args, **kwargs):
requires_backends(self, ['detectron2'])
@classmethod
def from_pretrained(cls, *args, **kwargs):
requires_backends(cls, ['detectron2']) |
class LayoutLMv2Model:
def __init__(self, *args, **kwargs):
pass
@classmethod
def from_pretrained(cls, *args, **kwargs):
pass | 4 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 | 2 | 7 | 1 | 6 | 4 | 2 | 0 | 5 | 3 | 2 | 1 | 0 | 0 | 2 |
6,552 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_essentia_and_librosa_and_pretty_midi_and_scipy_and_torch_objects.py | transformers.utils.dummy_essentia_and_librosa_and_pretty_midi_and_scipy_and_torch_objects.Pop2PianoFeatureExtractor | from ..utils import DummyObject, requires_backends
class Pop2PianoFeatureExtractor(metaclass=DummyObject):
_backends = ['essentia', 'librosa', 'pretty_midi', 'scipy', 'torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['essentia', 'librosa', 'pretty_midi', 'scipy', 'torch']) |
class Pop2PianoFeatureExtractor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,553 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_essentia_and_librosa_and_pretty_midi_and_scipy_and_torch_objects.py | transformers.utils.dummy_essentia_and_librosa_and_pretty_midi_and_scipy_and_torch_objects.Pop2PianoProcessor | from ..utils import DummyObject, requires_backends
class Pop2PianoProcessor(metaclass=DummyObject):
_backends = ['essentia', 'librosa', 'pretty_midi', 'scipy', 'torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['essentia', 'librosa', 'pretty_midi', 'scipy', 'torch']) |
class Pop2PianoProcessor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,554 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_essentia_and_librosa_and_pretty_midi_and_scipy_and_torch_objects.py | transformers.utils.dummy_essentia_and_librosa_and_pretty_midi_and_scipy_and_torch_objects.Pop2PianoTokenizer | from ..utils import DummyObject, requires_backends
class Pop2PianoTokenizer(metaclass=DummyObject):
_backends = ['essentia', 'librosa', 'pretty_midi', 'scipy', 'torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['essentia', 'librosa', 'pretty_midi', 'scipy', 'torch']) |
class Pop2PianoTokenizer(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,555 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_music_objects.py | transformers.utils.dummy_music_objects.Pop2PianoFeatureExtractor | from ..utils import DummyObject, requires_backends
class Pop2PianoFeatureExtractor(metaclass=DummyObject):
_backends = ['music']
def __init__(self, *args, **kwargs):
requires_backends(self, ['music']) |
class Pop2PianoFeatureExtractor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 15 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 3 | 0 | 1 |
6,556 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_music_objects.py | transformers.utils.dummy_music_objects.Pop2PianoTokenizer | from ..utils import DummyObject, requires_backends
class Pop2PianoTokenizer(metaclass=DummyObject):
_backends = ['music']
def __init__(self, *args, **kwargs):
requires_backends(self, ['music']) |
class Pop2PianoTokenizer(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 15 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 3 | 0 | 1 |
6,557 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.Adafactor | from ..utils import DummyObject, requires_backends
class Adafactor(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class Adafactor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,558 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.AlternatingCodebooksLogitsProcessor | from ..utils import DummyObject, requires_backends
class AlternatingCodebooksLogitsProcessor(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class AlternatingCodebooksLogitsProcessor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,559 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.BayesianDetectorConfig | from ..utils import DummyObject, requires_backends
class BayesianDetectorConfig(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class BayesianDetectorConfig(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,560 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.BayesianDetectorModel | from ..utils import DummyObject, requires_backends
class BayesianDetectorModel(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class BayesianDetectorModel(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,561 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.BeamScorer | from ..utils import DummyObject, requires_backends
class BeamScorer(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class BeamScorer(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,562 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.Cache | from ..utils import DummyObject, requires_backends
class Cache(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class Cache(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,563 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.ClassifierFreeGuidanceLogitsProcessor | from ..utils import DummyObject, requires_backends
class ClassifierFreeGuidanceLogitsProcessor(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class ClassifierFreeGuidanceLogitsProcessor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,564 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.ConstrainedBeamSearchScorer | from ..utils import DummyObject, requires_backends
class ConstrainedBeamSearchScorer(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class ConstrainedBeamSearchScorer(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,565 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.Constraint | from ..utils import DummyObject, requires_backends
class Constraint(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class Constraint(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,566 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.ConstraintListState | from ..utils import DummyObject, requires_backends
class ConstraintListState(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class ConstraintListState(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,567 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.Conv1D | from ..utils import DummyObject, requires_backends
class Conv1D(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class Conv1D(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,568 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.DisjunctiveConstraint | from ..utils import DummyObject, requires_backends
class DisjunctiveConstraint(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class DisjunctiveConstraint(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,569 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.DynamicCache | from ..utils import DummyObject, requires_backends
class DynamicCache(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class DynamicCache(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,570 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.EncoderDecoderCache | from ..utils import DummyObject, requires_backends
class EncoderDecoderCache(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class EncoderDecoderCache(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,571 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.EncoderNoRepeatNGramLogitsProcessor | from ..utils import DummyObject, requires_backends
class EncoderNoRepeatNGramLogitsProcessor(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class EncoderNoRepeatNGramLogitsProcessor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,572 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.EncoderRepetitionPenaltyLogitsProcessor | from ..utils import DummyObject, requires_backends
class EncoderRepetitionPenaltyLogitsProcessor(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class EncoderRepetitionPenaltyLogitsProcessor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,573 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.EosTokenCriteria | from ..utils import DummyObject, requires_backends
class EosTokenCriteria(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class EosTokenCriteria(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,574 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.EpsilonLogitsWarper | from ..utils import DummyObject, requires_backends
class EpsilonLogitsWarper(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class EpsilonLogitsWarper(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,575 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.EtaLogitsWarper | from ..utils import DummyObject, requires_backends
class EtaLogitsWarper(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class EtaLogitsWarper(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,576 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.ExponentialDecayLengthPenalty | from ..utils import DummyObject, requires_backends
class ExponentialDecayLengthPenalty(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class ExponentialDecayLengthPenalty(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,577 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.ForcedBOSTokenLogitsProcessor | from ..utils import DummyObject, requires_backends
class ForcedBOSTokenLogitsProcessor(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class ForcedBOSTokenLogitsProcessor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,578 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.ForcedEOSTokenLogitsProcessor | from ..utils import DummyObject, requires_backends
class ForcedEOSTokenLogitsProcessor(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class ForcedEOSTokenLogitsProcessor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,579 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.GenerationMixin | from ..utils import DummyObject, requires_backends
class GenerationMixin(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class GenerationMixin(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,580 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.GlueDataTrainingArguments | from ..utils import DummyObject, requires_backends
class GlueDataTrainingArguments(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class GlueDataTrainingArguments(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,581 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.GlueDataset | from ..utils import DummyObject, requires_backends
class GlueDataset(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class GlueDataset(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,582 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.HQQQuantizedCache | from ..utils import DummyObject, requires_backends
class HQQQuantizedCache(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class HQQQuantizedCache(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,583 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.HybridCache | from ..utils import DummyObject, requires_backends
class HybridCache(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class HybridCache(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,584 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.InfNanRemoveLogitsProcessor | from ..utils import DummyObject, requires_backends
class InfNanRemoveLogitsProcessor(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class InfNanRemoveLogitsProcessor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,585 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.LineByLineTextDataset | from ..utils import DummyObject, requires_backends
class LineByLineTextDataset(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class LineByLineTextDataset(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,586 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.LineByLineWithRefDataset | from ..utils import DummyObject, requires_backends
class LineByLineWithRefDataset(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class LineByLineWithRefDataset(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,587 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.LineByLineWithSOPTextDataset | from ..utils import DummyObject, requires_backends
class LineByLineWithSOPTextDataset(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class LineByLineWithSOPTextDataset(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,588 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.LogitNormalization | from ..utils import DummyObject, requires_backends
class LogitNormalization(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class LogitNormalization(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,589 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.LogitsProcessor | from ..utils import DummyObject, requires_backends
class LogitsProcessor(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class LogitsProcessor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,590 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.LogitsProcessorList | from ..utils import DummyObject, requires_backends
class LogitsProcessorList(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class LogitsProcessorList(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,591 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.MaxLengthCriteria | from ..utils import DummyObject, requires_backends
class MaxLengthCriteria(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class MaxLengthCriteria(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,592 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.MaxTimeCriteria | from ..utils import DummyObject, requires_backends
class MaxTimeCriteria(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class MaxTimeCriteria(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,593 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.MinLengthLogitsProcessor | from ..utils import DummyObject, requires_backends
class MinLengthLogitsProcessor(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class MinLengthLogitsProcessor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,594 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.MinNewTokensLengthLogitsProcessor | from ..utils import DummyObject, requires_backends
class MinNewTokensLengthLogitsProcessor(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class MinNewTokensLengthLogitsProcessor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,595 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.MinPLogitsWarper | from ..utils import DummyObject, requires_backends
class MinPLogitsWarper(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class MinPLogitsWarper(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,596 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.NoBadWordsLogitsProcessor | from ..utils import DummyObject, requires_backends
class NoBadWordsLogitsProcessor(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class NoBadWordsLogitsProcessor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,597 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.NoRepeatNGramLogitsProcessor | from ..utils import DummyObject, requires_backends
class NoRepeatNGramLogitsProcessor(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class NoRepeatNGramLogitsProcessor(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,598 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.OffloadedCache | from ..utils import DummyObject, requires_backends
class OffloadedCache(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class OffloadedCache(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
6,599 | huggingface/pytorch-pretrained-BERT | huggingface_pytorch-pretrained-BERT/src/transformers/utils/dummy_pt_objects.py | transformers.utils.dummy_pt_objects.OffloadedStaticCache | from ..utils import DummyObject, requires_backends
class OffloadedStaticCache(metaclass=DummyObject):
_backends = ['torch']
def __init__(self, *args, **kwargs):
requires_backends(self, ['torch']) |
class OffloadedStaticCache(metaclass=DummyObject):
def __init__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.