`AutoScaler` cleanup

Former-commit-id: 210cd56b19
group-chat
Kye 1 year ago
parent 9441287e2a
commit 3fc7fceacc

@ -4,14 +4,21 @@ from time import sleep
from swarms.workers.worker import Worker from swarms.workers.worker import Worker
from swarms.utils.decorators import error_decorator, log_decorator, timing_decorator from swarms.utils.decorators import error_decorator, log_decorator, timing_decorator
#from shapeless import shapeless
# TODO Handle task assignment and task delegation # TODO Handle task assignment and task delegation
# TODO: User task => decomposed into very small sub tasks => sub tasks assigned to workers => workers complete and update the swarm, can ask for help from other agents. # TODO: User task => decomposed into very small sub tasks => sub tasks assigned to workers => workers complete and update the swarm, can ask for help from other agents.
# TODO: Missing, Task Assignment, Task delegation, Task completion, Swarm level communication with vector db # TODO: Missing, Task Assignment, Task delegation, Task completion, Swarm level communication with vector db
#@shapeless
class AutoScaler: class AutoScaler:
"""
# usage of usage
auto_scaler = AutoScaler(agent=YourCustomAgent)
auto_scaler.start()
for i in range(100):
auto_scaler.add_task9f"task {I}})
"""
@log_decorator @log_decorator
@error_decorator @error_decorator
@timing_decorator @timing_decorator
@ -74,10 +81,3 @@ class AutoScaler:
available_agent = next((agent for agent in self.agents_pool)) available_agent = next((agent for agent in self.agents_pool))
if available_agent: if available_agent:
available_agent.run(task) available_agent.run(task)
#usage of usage
#auto_scaler = AutoScaler(agent=YourCustomAgent)
# auto_scaler.start()
#for i in range(100):
# auto_scaler.add_task9f"task {I}})
Loading…
Cancel
Save