diff --git a/pyproject.toml b/pyproject.toml index e0f8d47a..0f51e7c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "swarms" -version = "3.9.3" +version = "3.9.4" description = "Swarms - Pytorch" license = "MIT" authors = ["Kye Gomez "] @@ -23,7 +23,7 @@ classifiers = [ [tool.poetry.dependencies] python = "^3.6.1" -torch = "2.1.1"p +torch = "2.1.1" transformers = "4.37.1" openai = "0.28.0" langchain = "0.0.333" diff --git a/swarms/structs/model_parallizer.py b/swarms/structs/model_parallizer.py index 0e898d16..828d4ef4 100644 --- a/swarms/structs/model_parallizer.py +++ b/swarms/structs/model_parallizer.py @@ -83,7 +83,6 @@ class ModelParallelizer: responses.append(llm(task)) return responses - # New Features def save_responses_to_file(self, filename): """Save responses to file""" diff --git a/swarms/utils/disable_logging.py b/swarms/utils/disable_logging.py index 3b6884d2..e7d2e5e6 100644 --- a/swarms/utils/disable_logging.py +++ b/swarms/utils/disable_logging.py @@ -33,4 +33,17 @@ def disable_logging(): logger = logging.getLogger(logger_name) logger.setLevel( logging.WARNING - ) # Supress DEBUG and info logs + ) # Suppress DEBUG and info logs + + # Create a file handler to log errors to the file + file_handler = logging.FileHandler("errors.txt") + file_handler.setLevel(logging.ERROR) + logging.getLogger().addHandler(file_handler) + + # Create a stream handler to log errors to the terminal + stream_handler = logging.StreamHandler() + stream_handler.setLevel(logging.ERROR) + logging.getLogger().addHandler(stream_handler) + + +disable_logging() diff --git a/tests/structs/test_swarmnetwork.py b/tests/structs/test_swarmnetwork.py index 6c4e29f7..b4e3593b 100644 --- a/tests/structs/test_swarmnetwork.py +++ b/tests/structs/test_swarmnetwork.py @@ -51,4 +51,3 @@ def test_swarm_network_remove_agent(swarm_network): swarm_network.remove_agent(agent_to_remove) assert len(swarm_network.agents) == 4 assert agent_to_remove not in swarm_network.agents -