Skip to content

Commit

Permalink
[FIX][execute_futures_dict]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Dec 2, 2023
1 parent 452bf7d commit e35b253
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 3 additions & 2 deletions futures.py
Original file line number Diff line number Diff line change
@@ -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):
Expand All @@ -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))
2 changes: 0 additions & 2 deletions swarms/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -8,7 +7,6 @@

__all__ = [
"display_markdown_message",
"execute_futures_dict",
"SubprocessCodeInterpreter",
"extract_code_in_backticks_in_string",
"pdf_to_text",
Expand Down

0 comments on commit e35b253

Please sign in to comment.