From e35b2530f3ee1a7bbfa4149e97a8e144246b7ca1 Mon Sep 17 00:00:00 2001 From: Kye Date: Fri, 1 Dec 2023 16:39:19 -0800 Subject: [PATCH] [FIX][execute_futures_dict] --- futures.py | 5 +++-- swarms/utils/__init__.py | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/futures.py b/futures.py index 6ebe26b9..c5c468df 100644 --- a/futures.py +++ b/futures.py @@ -1,7 +1,7 @@ import concurrent.futures import time import random -import swarms.utils.execute_futures +from swarms.utils.futures import execute_futures_dict def f(x): @@ -10,5 +10,6 @@ def f(x): with concurrent.futures.ThreadPoolExecutor() as executor: + """Create a dictionary of futures.""" fs_dict = {str(i): executor.submit(f, i) for i in range(10)} - print(swarms.utils.execute_futures.execute_futures_dict(fs_dict)) + print(execute_futures_dict(fs_dict)) diff --git a/swarms/utils/__init__.py b/swarms/utils/__init__.py index f6ee793d..8c935f26 100644 --- a/swarms/utils/__init__.py +++ b/swarms/utils/__init__.py @@ -1,5 +1,4 @@ from swarms.utils.markdown_message import display_markdown_message -from swarms.utils.execute_futures import execute_futures_dict from swarms.utils.code_interpreter import SubprocessCodeInterpreter from swarms.utils.parse_code import ( extract_code_in_backticks_in_string, @@ -8,7 +7,6 @@ from swarms.utils.pdf_to_text import pdf_to_text __all__ = [ "display_markdown_message", - "execute_futures_dict", "SubprocessCodeInterpreter", "extract_code_in_backticks_in_string", "pdf_to_text",