From 98ef99c3030fdcd8496e84c6bdccccc0de30ca6a Mon Sep 17 00:00:00 2001 From: Kye Date: Thu, 27 Jul 2023 17:31:02 -0400 Subject: [PATCH] clean up Former-commit-id: 30fa7e1e87b832948d0fb11a4ccd3fafac5ae65a --- requirements.txt | 3 --- swarms/orchestrate.py | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 042d9a53..526be8cf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,7 +23,6 @@ controlnet-aux diffusers==0.14.0 einops -gradio imageio imageio-ffmpeg @@ -112,6 +111,4 @@ fastapi-limiter sphinx_rtd_theme pegasusx - - oceandb diff --git a/swarms/orchestrate.py b/swarms/orchestrate.py index fabf4738..f677edc8 100644 --- a/swarms/orchestrate.py +++ b/swarms/orchestrate.py @@ -24,7 +24,7 @@ In terms of architecture, the swarm might look something like this: ``` (Orchestrator) / \ - Tools + Vector DB -- (LLM Agent)---(Communication Layer) (Communication Layer)---(LLM Agent)-- Tools + Vector DB + ( Agent)---(Communication Layer) (Communication Layer)---(Agent) / | | \ (Task Assignment) (Task Completion) (Task Assignment) (Task Completion) ``` @@ -46,7 +46,9 @@ Orchestrate(WorkerNode, autoscale=True, nodes=int, swarm_type="flat") from abc import ABC, abstractmethod import celery from typing import List, Dict, Any + import numpy as np +import threading from swarms.agents.memory.ocean import OceanDB @@ -63,7 +65,7 @@ class Orchestrator(ABC): self.task_queue = task_queue self.vector_db = vector_db self.current_tasks = {} - self.lock = Lock() + self.lock = threading.Lock() @abstractmethod def assign_task(self, agent_id: int, task: Dict[str, Any]) -> None: