From 0ee2efb6e38da549a88c27fc9f9b6c3066433a23 Mon Sep 17 00:00:00 2001 From: rickyloynd-microsoft Date: Fri, 24 Nov 2023 17:44:59 -0800 Subject: [PATCH 1/5] Use tqdm to report progress in learn_from_user_feedback() --- autogen/agentchat/contrib/teachable_agent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autogen/agentchat/contrib/teachable_agent.py b/autogen/agentchat/contrib/teachable_agent.py index 29d7f197ffca..e746548862c0 100644 --- a/autogen/agentchat/contrib/teachable_agent.py +++ b/autogen/agentchat/contrib/teachable_agent.py @@ -1,5 +1,4 @@ import os -from autogen import oai from autogen.agentchat.agent import Agent from autogen.agentchat.assistant_agent import ConversableAgent from autogen.agentchat.contrib.text_analyzer_agent import TextAnalyzerAgent @@ -7,6 +6,7 @@ import chromadb from chromadb.config import Settings import pickle +from tqdm import tqdm try: @@ -133,7 +133,7 @@ def learn_from_user_feedback(self): print(colored("\nREVIEWING CHAT FOR USER TEACHINGS TO REMEMBER", "light_yellow")) # Look at each user turn. if len(self.user_comments) > 0: - for comment in self.user_comments: + for comment in tqdm(self.user_comments): # Consider whether to store something from this user turn in the DB. self.consider_memo_storage(comment) self.user_comments = [] From 5815d43dc164966bf6ee3e156860b8e8e1e9aabc Mon Sep 17 00:00:00 2001 From: Ricky Loynd Date: Tue, 28 Nov 2023 15:08:29 -0800 Subject: [PATCH 2/5] Update contrib-openai.yml Append `pytest-asyncio` to `pip install coverage` for TeachableAgent. --- .github/workflows/contrib-openai.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/contrib-openai.yml b/.github/workflows/contrib-openai.yml index 63abe36b891f..7ac834c3ff0f 100644 --- a/.github/workflows/contrib-openai.yml +++ b/.github/workflows/contrib-openai.yml @@ -161,7 +161,7 @@ jobs: python -m pip install --upgrade pip wheel pip install -e .[teachable] python -c "import autogen" - pip install coverage + pip install coverage pytest-asyncio - name: Coverage env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} From 91d5afb3b296bc52a26887d21d742d3d92af3dc4 Mon Sep 17 00:00:00 2001 From: Ricky Loynd Date: Tue, 28 Nov 2023 15:18:26 -0800 Subject: [PATCH 3/5] Replace pytest-asyncio with pytest --- .github/workflows/contrib-openai.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/contrib-openai.yml b/.github/workflows/contrib-openai.yml index 7ac834c3ff0f..f0d497b3cd6a 100644 --- a/.github/workflows/contrib-openai.yml +++ b/.github/workflows/contrib-openai.yml @@ -161,7 +161,7 @@ jobs: python -m pip install --upgrade pip wheel pip install -e .[teachable] python -c "import autogen" - pip install coverage pytest-asyncio + pip install coverage pytest - name: Coverage env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} From 65d86e45d376db9d465f0bf19284e62bafd7a845 Mon Sep 17 00:00:00 2001 From: rickyloynd-microsoft Date: Tue, 28 Nov 2023 16:09:34 -0800 Subject: [PATCH 4/5] Temporary usage of pull_request action. --- .github/workflows/contrib-openai.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/contrib-openai.yml b/.github/workflows/contrib-openai.yml index f0d497b3cd6a..f884e48c03bd 100644 --- a/.github/workflows/contrib-openai.yml +++ b/.github/workflows/contrib-openai.yml @@ -4,7 +4,7 @@ name: OpenAI4ContribTests on: - pull_request_target: + pull_request: branches: ['main'] paths: - 'autogen/**' From 6e577c8090a7a8644710aa5e744e23961b2a607a Mon Sep 17 00:00:00 2001 From: rickyloynd-microsoft Date: Tue, 28 Nov 2023 16:30:29 -0800 Subject: [PATCH 5/5] Restore pull_request_target action. --- .github/workflows/contrib-openai.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/contrib-openai.yml b/.github/workflows/contrib-openai.yml index f884e48c03bd..f0d497b3cd6a 100644 --- a/.github/workflows/contrib-openai.yml +++ b/.github/workflows/contrib-openai.yml @@ -4,7 +4,7 @@ name: OpenAI4ContribTests on: - pull_request: + pull_request_target: branches: ['main'] paths: - 'autogen/**'