Skip to content

Commit

Permalink
Revert "Refactoring the generate() function (huggingface#6949)"
Browse files Browse the repository at this point in the history
This reverts commit 7c2a6bc.
  • Loading branch information
fabiocapsouza authored Nov 15, 2020
1 parent 45723a5 commit 5e0ea22
Show file tree
Hide file tree
Showing 38 changed files with 1,162 additions and 2,993 deletions.
1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,3 @@ conversion utilities for the following models:
internal/pipelines_utils
internal/tokenization_utils
internal/trainer_utils
internal/generation_utils
50 changes: 0 additions & 50 deletions docs/source/internal/generation_utils.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/main_classes/model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ TFModelUtilsMixin
:members:


Generation
Generative models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.generation_utils.GenerationMixin
Expand Down
13 changes: 0 additions & 13 deletions src/transformers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,19 +299,6 @@
TextDataset,
TextDatasetForNextSentencePrediction,
)
from .generation_beam_search import BeamScorer, BeamSearchScorer
from .generation_logits_process import (
LogitsProcessor,
LogitsProcessorList,
LogitsWarper,
MinLengthLogitsProcessor,
NoBadWordsLogitsProcessor,
NoRepeatNGramLogitsProcessor,
RepetitionPenaltyLogitsProcessor,
TemperatureLogitsWarper,
TopKLogitsWarper,
TopPLogitsWarper,
)
from .generation_utils import top_k_top_p_filtering
from .modeling_albert import (
ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
Expand Down
Loading

0 comments on commit 5e0ea22

Please sign in to comment.