Update quality tooling for formatting (#21480)
* Result of black 23.1 * Update target to Python 3.7 * Switch flake8 to ruff * Configure isort * Configure isort * Apply isort with line limit * Put the right black version * adapt black in check copies * Fix copies
This commit is contained in:
@@ -24,6 +24,7 @@ from ...test_modeling_flax_common import FlaxModelTesterMixin, floats_tensor, id
|
||||
|
||||
if is_flax_available():
|
||||
import jax.numpy as jnp
|
||||
|
||||
from transformers.models.roberta_prelayernorm.modeling_flax_roberta_prelayernorm import (
|
||||
FlaxRobertaPreLayerNormForCausalLM,
|
||||
FlaxRobertaPreLayerNormForMaskedLM,
|
||||
@@ -135,7 +136,6 @@ class FlaxRobertaPreLayerNormModelTester(unittest.TestCase):
|
||||
@require_flax
|
||||
# Copied from tests.models.roberta.test_modelling_flax_roberta.FlaxRobertaPreLayerNormModelTest with ROBERTA->ROBERTA_PRELAYERNORM,Roberta->RobertaPreLayerNorm,roberta-base->andreasmadsen/efficient_mlm_m0.40
|
||||
class FlaxRobertaPreLayerNormModelTest(FlaxModelTesterMixin, unittest.TestCase):
|
||||
|
||||
test_head_masking = True
|
||||
|
||||
all_model_classes = (
|
||||
|
||||
@@ -366,7 +366,6 @@ class RobertaPreLayerNormModelTester:
|
||||
@require_torch
|
||||
# Copied from tests.models.roberta.test_modelling_roberta.RobertaPreLayerNormModelTest with ROBERTA->ROBERTA_PRELAYERNORM,Roberta->RobertaPreLayerNorm
|
||||
class RobertaPreLayerNormModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.TestCase):
|
||||
|
||||
all_model_classes = (
|
||||
(
|
||||
RobertaPreLayerNormForCausalLM,
|
||||
|
||||
@@ -550,7 +550,6 @@ class TFRobertaPreLayerNormModelTester:
|
||||
@require_tf
|
||||
# Copied from tests.models.roberta.test_modelling_tf_roberta.TFRobertaPreLayerNormModelTest with ROBERTA->ROBERTA_PRELAYERNORM,Roberta->RobertaPreLayerNorm
|
||||
class TFRobertaPreLayerNormModelTest(TFModelTesterMixin, unittest.TestCase):
|
||||
|
||||
all_model_classes = (
|
||||
(
|
||||
TFRobertaPreLayerNormModel,
|
||||
|
||||
Reference in New Issue
Block a user