[FIX][execute_futures_dict]

pull/244/head
Kye 1 year ago
parent 452bf7dd21
commit e35b2530f3

@ -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))

@ -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",

Loading…
Cancel
Save