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:
@@ -81,7 +81,6 @@ class LevitImageProcessingTester(unittest.TestCase):
|
||||
@require_torch
|
||||
@require_vision
|
||||
class LevitImageProcessingTest(ImageProcessingSavingTestMixin, unittest.TestCase):
|
||||
|
||||
image_processing_class = LevitImageProcessor if is_vision_available() else None
|
||||
|
||||
def setUp(self):
|
||||
|
||||
@@ -337,7 +337,6 @@ class LevitModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
loss.backward()
|
||||
|
||||
def test_problem_types(self):
|
||||
|
||||
parsed_torch_version_base = version.parse(version.parse(torch.__version__).base_version)
|
||||
if parsed_torch_version_base.base_version.startswith("1.9"):
|
||||
self.skipTest(reason="This test fails with PyTorch 1.9.x: some CUDA issue")
|
||||
@@ -362,7 +361,6 @@ class LevitModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
|
||||
for problem_type in problem_types:
|
||||
with self.subTest(msg=f"Testing {model_class} with {problem_type['title']}"):
|
||||
|
||||
config.problem_type = problem_type["title"]
|
||||
config.num_labels = problem_type["num_labels"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user