Skip to content

Commit

Permalink
Fixed code quality errors
Browse files Browse the repository at this point in the history
  • Loading branch information
William committed Jan 5, 2024
1 parent 6570e5d commit 06f1a7d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/adapters/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"T5Model": T5ModelAdaptersMixin,
"T5ForConditionalGeneration": T5ForCondiditionalGenerationWithHeadsMixin,
"T5ForQuestionAnswering": T5ForQuestionAnsweringWithHeadsMixin,
"T5EncoderModel": T5ModelAdaptersMixin,
"T5EncoderModel": T5ModelAdaptersMixin,
"ViTIntermediate": ViTIntermediateAdaptersMixin,
"ViTModel": ViTModelAdaptersMixin,
"XLMRobertaLayer": BertLayerAdaptersMixin,
Expand Down
11 changes: 9 additions & 2 deletions src/adapters/models/mt5/adapter_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

import torch

from transformers.models.mt5.modeling_mt5 import MT5_INPUTS_DOCSTRING, MT5_START_DOCSTRING, MT5Model, MT5PreTrainedModel
from transformers.models.mt5.modeling_mt5 import (
MT5_INPUTS_DOCSTRING,
MT5_START_DOCSTRING,
MT5Model,
MT5PreTrainedModel,
)
from transformers.utils import add_start_docstrings, add_start_docstrings_to_model_forward

from ...composition import adjust_tensors_for_parallel
Expand All @@ -20,7 +25,9 @@
logger = logging.getLogger(__name__)


@add_start_docstrings("MT5 Model with the option to add multiple flexible prediction heads on top.", MT5_START_DOCSTRING)
@add_start_docstrings(
"MT5 Model with the option to add multiple flexible prediction heads on top.", MT5_START_DOCSTRING
)
class MT5AdapterModel(EmbeddingAdaptersWrapperMixin, ModelWithFlexibleHeadsAdaptersMixin, MT5PreTrainedModel):
_tied_weights_keys = [
"encoder.embed_tokens.weight",
Expand Down

0 comments on commit 06f1a7d

Please sign in to comment.