Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch 'agiresearch:main' into 'agiresearch:dev' #49

Merged
merged 72 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
75975ea
Update README.md
Apr 2, 2024
dea31d5
Merge pull request #16 from agiresearch/agiresearch-patch-1
Apr 2, 2024
be41661
doc: add instructions of how to contribute
dongyuanjushi Apr 2, 2024
df009dc
docs: fix link
Apr 2, 2024
1ed077b
Update README.md add max python version
1tylermitchell Apr 2, 2024
1365e30
Merge pull request #18 from JHSUYU/readme
evison Apr 2, 2024
5bed009
Merge pull request #19 from 1tylermitchell/patch-1
dongyuanjushi Apr 2, 2024
7394ecc
Update README.md
Apr 2, 2024
9c943e6
Merge pull request #20 from agiresearch/agiresearch-patch-2
evison Apr 2, 2024
db3df42
Delete AIOS.pdf
Apr 2, 2024
feb9f1a
Merge pull request #21 from agiresearch/agiresearch-patch-3
evison Apr 2, 2024
f42b534
docs: add reference to pre-commit and pytest
dongyuanjushi Apr 2, 2024
c9ee66d
Merge pull request #22 from dongyuanjushi/main
evison Apr 2, 2024
7a5ca2e
chore: add pre-commit check
dongyuanjushi Apr 3, 2024
450af7b
chore: add pre-commit check dependencies
dongyuanjushi Apr 3, 2024
ecb2874
Merge branch 'agiresearch:main' into main
dongyuanjushi Apr 3, 2024
dc5b340
Merge pull request #23 from dongyuanjushi/main
Apr 3, 2024
4343d21
test: closed llm output
dongyuanjushi Apr 3, 2024
dc679eb
chore: add pytest
dongyuanjushi Apr 3, 2024
3fc831f
Merge pull request #25 from dongyuanjushi/main
Apr 3, 2024
6678f29
test: add memory test
JHSUYU Apr 3, 2024
0e39ae4
Merge pull request #26 from JHSUYU/test_memory
dongyuanjushi Apr 3, 2024
01bb829
Update README.md
Apr 3, 2024
2f50717
Merge pull request #27 from agiresearch/agiresearch-patch-4
evison Apr 3, 2024
18750d3
Update README.md
Apr 3, 2024
657798d
Merge pull request #28 from agiresearch/agiresearch-patch-5
Apr 3, 2024
9f0ecc0
Update README.md
Apr 3, 2024
5563475
Merge pull request #29 from agiresearch/agiresearch-patch-6
Apr 3, 2024
1c1c216
test: add test for rapid api calling
dongyuanjushi Apr 4, 2024
306f434
Merge pull request #30 from dongyuanjushi/main
evison Apr 4, 2024
1ffb033
refactor: add shell simulator
dongyuanjushi Apr 5, 2024
ebb70e4
Merge branch 'main' of github.com:dongyuanjushi/AIOS
dongyuanjushi Apr 5, 2024
ef30532
docs: add deployment mode instructions
dongyuanjushi Apr 5, 2024
4929a68
Merge pull request #31 from dongyuanjushi/main
evison Apr 5, 2024
21fd8c1
Update simulator.py
eltociear Apr 5, 2024
353de3a
Merge pull request #32 from eltociear/patch-3
dongyuanjushi Apr 5, 2024
5ede508
Update README.md
Apr 5, 2024
f5e319c
Merge pull request #33 from agiresearch/agiresearch-patch-7
evison Apr 5, 2024
8de1f44
Update README.md
Apr 5, 2024
9151270
Merge pull request #34 from agiresearch/agiresearch-patch-8
evison Apr 5, 2024
f12854c
Update README.md
Apr 5, 2024
99d59e6
Merge pull request #35 from agiresearch/agiresearch-patch-9
evison Apr 5, 2024
6fd3ab5
Update README.md
Apr 5, 2024
cf1cf3a
Merge pull request #36 from agiresearch/agiresearch-patch-10
evison Apr 5, 2024
37304e2
feat: add agent ID recycler
dongyuanjushi Apr 5, 2024
8df6274
Merge pull request #37 from dongyuanjushi/main
Apr 6, 2024
0f8557c
fix: deployment mode printing only to the file
dongyuanjushi Apr 6, 2024
262debd
Merge pull request #38 from dongyuanjushi/main
evison Apr 6, 2024
aed876f
feat: add gpt-3.5-turbo and gpt-4 as llm backbone
dongyuanjushi Apr 7, 2024
fe7f4e6
Merge pull request #40 from dongyuanjushi/main
dongyuanjushi Apr 7, 2024
01ff142
docs: add support of gpt-3.5 and gpt-4
dongyuanjushi Apr 7, 2024
31b53c5
Merge branch 'agiresearch:main' into main
dongyuanjushi Apr 7, 2024
15cfec2
chore: add pympler dependencies
dongyuanjushi Apr 7, 2024
8bee2d0
Merge branch 'main' of github.com:dongyuanjushi/AIOS
dongyuanjushi Apr 7, 2024
9936ee4
Merge pull request #41 from dongyuanjushi/main
evison Apr 7, 2024
fe1b5a5
Update README.md
evison Apr 7, 2024
527a970
Merge pull request #42 from agiresearch/evison-patch-1
Apr 7, 2024
03b2071
fix: address logger output issue
dongyuanjushi Apr 7, 2024
cbda495
Merge pull request #43 from dongyuanjushi/main
dongyuanjushi Apr 7, 2024
12a4128
Update README.md
Apr 8, 2024
943df5b
Merge pull request #44 from agiresearch/agiresearch-patch-1
evison Apr 8, 2024
706d777
Update README.md
Apr 8, 2024
da320f7
Merge pull request #45 from agiresearch/agiresearch-patch-11
evison Apr 8, 2024
8c63261
Update README.md
Apr 8, 2024
1ad16f2
Merge pull request #46 from agiresearch/agiresearch-patch-12
evison Apr 8, 2024
93f1a87
style: change output format of printing agent
dongyuanjushi Apr 8, 2024
595ba30
feat: add workflow for Math Agent to call tools
dongyuanjushi Apr 8, 2024
511a375
style: remove tokenizer ID printing
dongyuanjushi Apr 8, 2024
6f27d6f
Merge branch 'agiresearch:main' into main
dongyuanjushi Apr 8, 2024
a006d33
Merge pull request #47 from dongyuanjushi/main
Apr 8, 2024
f3695e0
Added support for Bedrock-provided models
JGalego Apr 8, 2024
79eb091
Merge pull request #48 from JGalego/feat/bedrock
dongyuanjushi Apr 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: deployment mode printing only to the file
  • Loading branch information
dongyuanjushi committed Apr 6, 2024
commit 0f8557c3c2571552ef61269b0c3afa892fcfe16c
11 changes: 9 additions & 2 deletions src/agents/agent_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
from concurrent.futures import ThreadPoolExecutor, as_completed

from threading import Thread, Lock, Event

from pympler import asizeof

class AgentFactory:
def __init__(self, llm, agent_process_queue, agent_log_mode):
self.MAX_AID = MAX_AID
Expand Down Expand Up @@ -52,11 +55,15 @@ def activate_agent(self, agent_name, task_input):
return agent

def print_agent(self):
headers = ["Agent ID", "Agent Name", "Created Time", "Status"]
headers = ["Agent ID", "Agent Name", "Created Time", "Status", "Memory Usage"]
data = []
for id, agent in self.current_agents.items():
agent_name = agent.agent_name
created_time = agent.created_time
status = agent.status
memory_usage = f"{asizeof.asizeof(agent)} bytes"
data.append(
[id, agent.agent_name, agent.created_time, agent.status]
[id, agent_name, created_time, status, memory_usage]
)
self.print(headers=headers, data=data)

Expand Down
12 changes: 10 additions & 2 deletions src/agents/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,24 @@ def run(self):
def setup_logger(self):
logger = logging.getLogger(f"{self.agent_name} Logger")
# logger.setLevel(logging.INFO) # Set the minimum logging level
logger.disabled = True
# logger.disabled = True
date_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
# Provide two log modes: console and file

# Ensure the logger doesn't propagate to the root logger
logger.propagate = False

# Remove all handlers associated with this logger
for handler in logger.handlers[:]:
logger.removeHandler(handler)

if self.log_mode == "console":
logger.disabled = False
# logger.disabled = False
handler = logging.StreamHandler()
handler.setLevel(logging.INFO) # Set logging level for console output
else:
assert self.log_mode == "file"
# logger.disabled = False
log_dir = os.path.join(os.getcwd(), "logs", "agents",
f"{self.agent_name}")
if not os.path.exists(log_dir):
Expand Down
7 changes: 6 additions & 1 deletion src/scheduler/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@ def start(self):
def setup_logger(self):
logger = logging.getLogger(f"FIFO Scheduler Logger")
# logger.setLevel(logging.INFO) # Set the minimum logging level
logger.disabled = True
date_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
# Provide two log modes: console and file
# Ensure the logger doesn't propagate to the root logger
logger.propagate = False

# Remove all handlers associated with this logger
for handler in logger.handlers[:]:
logger.removeHandler(handler)

if self.log_mode == "console":
handler = logging.StreamHandler()
Expand Down