From b2c46c043abd256bccf33da34fc7759bf9872f2f Mon Sep 17 00:00:00 2001 From: Kye Date: Tue, 5 Dec 2023 01:23:44 -0800 Subject: [PATCH] [TESTS FIX] --- tests/models/test_huggingface.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/tests/models/test_huggingface.py b/tests/models/test_huggingface.py index 326a66cf..b313eaf4 100644 --- a/tests/models/test_huggingface.py +++ b/tests/models/test_huggingface.py @@ -212,13 +212,6 @@ def test_llm_cleanup(mock_model, mock_tokenizer, llm_instance): -# Test if the model is re-downloaded when changing the model_id -@patch("swarms.models.huggingface.HuggingfaceLLM._download_model") -def test_llm_change_model_id(mock_download, llm_instance): - new_model_id = "gpt2-xl" - llm_instance.model_id = new_model_id - mock_download.assert_called_with(new_model_id) - # Test model's ability to handle multilingual input @patch("swarms.models.huggingface.HuggingfaceLLM.run") @@ -243,14 +236,6 @@ def test_llm_caching_mechanism(mock_run, llm_instance): assert first_run_result == second_run_result -# Ensure that model re-downloads when force_download flag is set -@patch("swarms.models.huggingface.HuggingfaceLLM._download_model") -def test_llm_force_download(mock_download, llm_instance): - llm_instance.download_model_with_progress(force_download=True) - mock_download.assert_called_once_with( - llm_instance.model_id, force=True - ) - # These tests are provided as examples. In real-world scenarios, you will need to adapt these tests to the actual logic of your `HuggingfaceLLM` class. # For instance, "mock_model.delete.assert_called_once()" and similar lines are based on hypothetical methods and behaviors that you need to replace with actual implementations.