Former-commit-id: 30fa7e1e87
pull/47/head
Kye 1 year ago
parent a88c97623c
commit 98ef99c303

@ -23,7 +23,6 @@ controlnet-aux
diffusers==0.14.0 diffusers==0.14.0
einops einops
gradio
imageio imageio
imageio-ffmpeg imageio-ffmpeg
@ -112,6 +111,4 @@ fastapi-limiter
sphinx_rtd_theme sphinx_rtd_theme
pegasusx pegasusx
oceandb oceandb

@ -24,7 +24,7 @@ In terms of architecture, the swarm might look something like this:
``` ```
(Orchestrator) (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) (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 from abc import ABC, abstractmethod
import celery import celery
from typing import List, Dict, Any from typing import List, Dict, Any
import numpy as np import numpy as np
import threading
from swarms.agents.memory.ocean import OceanDB from swarms.agents.memory.ocean import OceanDB
@ -63,7 +65,7 @@ class Orchestrator(ABC):
self.task_queue = task_queue self.task_queue = task_queue
self.vector_db = vector_db self.vector_db = vector_db
self.current_tasks = {} self.current_tasks = {}
self.lock = Lock() self.lock = threading.Lock()
@abstractmethod @abstractmethod
def assign_task(self, agent_id: int, task: Dict[str, Any]) -> None: def assign_task(self, agent_id: int, task: Dict[str, Any]) -> None:

Loading…
Cancel
Save