Skip to content

Commit

Permalink
Fix test error of compressible agent (microsoft#631)
Browse files Browse the repository at this point in the history
* fix bug in test

* update workflow

* update

* deepcopy to copy
  • Loading branch information
yiranwu0 authored Nov 11, 2023
1 parent 6a95932 commit 255bf22
Show file tree
Hide file tree
Showing 5 changed files with 1,304 additions and 1,304 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
run: |
pip install -e .[mathchat,test]
pip uninstall -y openai
coverage run -a -m pytest test
coverage run -a -m pytest test --ignore=test/agentchat/contrib
coverage xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }}
OAI_CONFIG_LIST: ${{ secrets.OAI_CONFIG_LIST }}
run: |
coverage run -a -m pytest test
coverage run -a -m pytest test --ignore=test/agentchat/contrib
coverage xml
- name: Coverage and check notebook outputs
if: matrix.python-version != '3.9'
Expand Down
2 changes: 1 addition & 1 deletion autogen/agentchat/contrib/compressible_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def _set_compress_config(self, compress_config: Optional[Dict] = False):
if compress_config.get("mode", "TERMINATE") not in allowed_modes:
raise ValueError(f"Invalid compression mode. Allowed values are: {', '.join(allowed_modes)}")

self.compress_config = self.DEFAULT_COMPRESS_CONFIG
self.compress_config = self.DEFAULT_COMPRESS_CONFIG.copy()
self.compress_config.update(compress_config)

if not isinstance(self.compress_config["leave_last_n"], int) or self.compress_config["leave_last_n"] < 0:
Expand Down
Loading

0 comments on commit 255bf22

Please sign in to comment.