Add ruff, remove black, isort, flake8, pylint (#3092)
* black, isort, flake8 -> ruff * remove unused * add back needed import * fix
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
# pylint: disable=too-many-lines
|
||||
"""Module for testing the validation module"""
|
||||
|
||||
import os
|
||||
@@ -49,7 +48,6 @@ class BaseValidation:
|
||||
self._caplog = caplog
|
||||
|
||||
|
||||
# pylint: disable=too-many-public-methods
|
||||
class TestValidation(BaseValidation):
|
||||
"""
|
||||
Test the validation module
|
||||
@@ -241,7 +239,7 @@ class TestValidation(BaseValidation):
|
||||
|
||||
def test_lr_as_float(self, minimal_cfg):
|
||||
cfg = (
|
||||
DictDefault( # pylint: disable=unsupported-binary-operation
|
||||
DictDefault(
|
||||
{
|
||||
"learning_rate": "5e-5",
|
||||
}
|
||||
@@ -303,7 +301,7 @@ class TestValidation(BaseValidation):
|
||||
)
|
||||
|
||||
cfg = (
|
||||
DictDefault( # pylint: disable=unsupported-binary-operation
|
||||
DictDefault(
|
||||
{
|
||||
"load_in_8bit": True,
|
||||
}
|
||||
@@ -315,7 +313,7 @@ class TestValidation(BaseValidation):
|
||||
validate_config(cfg)
|
||||
|
||||
cfg = (
|
||||
DictDefault( # pylint: disable=unsupported-binary-operation
|
||||
DictDefault(
|
||||
{
|
||||
"gptq": True,
|
||||
}
|
||||
@@ -327,7 +325,7 @@ class TestValidation(BaseValidation):
|
||||
validate_config(cfg)
|
||||
|
||||
cfg = (
|
||||
DictDefault( # pylint: disable=unsupported-binary-operation
|
||||
DictDefault(
|
||||
{
|
||||
"load_in_4bit": False,
|
||||
}
|
||||
@@ -339,7 +337,7 @@ class TestValidation(BaseValidation):
|
||||
validate_config(cfg)
|
||||
|
||||
cfg = (
|
||||
DictDefault( # pylint: disable=unsupported-binary-operation
|
||||
DictDefault(
|
||||
{
|
||||
"load_in_4bit": True,
|
||||
}
|
||||
@@ -361,7 +359,7 @@ class TestValidation(BaseValidation):
|
||||
)
|
||||
|
||||
cfg = (
|
||||
DictDefault( # pylint: disable=unsupported-binary-operation
|
||||
DictDefault(
|
||||
{
|
||||
"load_in_8bit": True,
|
||||
}
|
||||
@@ -373,7 +371,7 @@ class TestValidation(BaseValidation):
|
||||
validate_config(cfg)
|
||||
|
||||
cfg = (
|
||||
DictDefault( # pylint: disable=unsupported-binary-operation
|
||||
DictDefault(
|
||||
{
|
||||
"gptq": True,
|
||||
}
|
||||
@@ -385,7 +383,7 @@ class TestValidation(BaseValidation):
|
||||
validate_config(cfg)
|
||||
|
||||
cfg = (
|
||||
DictDefault( # pylint: disable=unsupported-binary-operation
|
||||
DictDefault(
|
||||
{
|
||||
"load_in_4bit": True,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user