From 90b8e4e0ba653b108c943526a75f2f493480311c Mon Sep 17 00:00:00 2001 From: Travis Addair Date: Sat, 12 Aug 2023 14:11:34 -0700 Subject: [PATCH] Revert "Ensure user sets backend to local w/ quantization (#3524)" (#3531) --- ludwig/config_validation/checks.py | 2 -- tests/ludwig/config_validation/test_checks.py | 5 +---- tests/ludwig/schema/test_model_config.py | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ludwig/config_validation/checks.py b/ludwig/config_validation/checks.py index 6d0697015f1..9387048519a 100644 --- a/ludwig/config_validation/checks.py +++ b/ludwig/config_validation/checks.py @@ -591,8 +591,6 @@ def _get_llm_model_config(model_name: str) -> AutoConfig: def check_llm_quantization_backend_incompatibility(config: "ModelConfig") -> None: # noqa: F821 """Checks that LLM model type with quantization uses the local backend.""" if config.backend is None: - if config.model_type == MODEL_LLM and config.quantization: - raise ConfigValidationError("LLM with quantization requires the 'local' backend to be set in the config.") return backend_type = config.backend.get("type", "local") diff --git a/tests/ludwig/config_validation/test_checks.py b/tests/ludwig/config_validation/test_checks.py index f4cd92d4c34..fb25c42152f 100644 --- a/tests/ludwig/config_validation/test_checks.py +++ b/tests/ludwig/config_validation/test_checks.py @@ -421,8 +421,7 @@ def test_check_llm_quantization_backend_incompatibility(): ModelConfig.from_dict(config) del config["backend"] - with pytest.raises(ConfigValidationError): - ModelConfig.from_dict(config) + ModelConfig.from_dict(config) del config["quantization"] config["backend"] = {"type": "ray"} @@ -444,8 +443,6 @@ def test_check_qlora(): type: text trainer: type: finetune -backend: - type: local """ ) diff --git a/tests/ludwig/schema/test_model_config.py b/tests/ludwig/schema/test_model_config.py index 6c2a65470db..8a29cbe6473 100644 --- a/tests/ludwig/schema/test_model_config.py +++ b/tests/ludwig/schema/test_model_config.py @@ -847,7 +847,6 @@ def test_llm_quantization_config(bits: Optional[int], expected_qconfig: Optional "quantization": {"bits": bits}, INPUT_FEATURES: [{NAME: "text_input", TYPE: "text"}], OUTPUT_FEATURES: [{NAME: "text_output", TYPE: "text"}], - "backend": {"type": "local"}, } if bits is None: