Skip to content

Commit

Permalink
bump version to 0.2.9 (#1430)
Browse files Browse the repository at this point in the history
* Fixed rounding bug.

* bump version to 0.2.9

* fix format error

* simplify contrib tests

---------

Co-authored-by: Adam Fourney <[email protected]>
  • Loading branch information
sonichi and afourney authored Jan 27, 2024
1 parent 1ab2354 commit fd0094c
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 47 deletions.
51 changes: 10 additions & 41 deletions .github/workflows/contrib-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -38,12 +38,12 @@ jobs:
run: |
python -m pip install --upgrade pip wheel
pip install pytest
- name: Install qdrant_client when python-version is 3.8 and 3.10
if: matrix.python-version == '3.8' || matrix.python-version == '3.10'
- name: Install qdrant_client when python-version is 3.10
if: matrix.python-version == '3.10'
run: |
pip install qdrant_client[fastembed]
- name: Install unstructured when python-version is 3.9 and 3.11 and not windows
if: (matrix.python-version == '3.9' || matrix.python-version == '3.11') && matrix.os != 'windows-2019'
- name: Install unstructured when python-version is 3.9 and not windows
if: matrix.python-version == '3.9' && matrix.os != 'windows-2019'
run: |
pip install unstructured[all-docs]
- name: Install packages and dependencies for RetrieveChat
Expand All @@ -59,13 +59,11 @@ jobs:
run: |
pytest test/test_retrieve_utils.py test/agentchat/contrib/test_retrievechat.py test/agentchat/contrib/test_qdrant_retrievechat.py --skip-openai
- name: Coverage
if: matrix.python-version == '3.10'
run: |
pip install coverage>=5.3
coverage run -a -m pytest test/test_retrieve_utils.py test/agentchat/contrib/test_retrievechat.py test/agentchat/contrib/test_qdrant_retrievechat.py --skip-openai
coverage xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
Expand All @@ -77,7 +75,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -97,18 +95,12 @@ jobs:
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
fi
- name: Test Compression
if: matrix.python-version != '3.10' # diversify the python versions
run: |
pytest test/agentchat/contrib/test_compressible_agent.py --skip-openai
- name: Coverage
if: matrix.python-version == '3.10'
run: |
pip install coverage>=5.3
coverage run -a -m pytest test/agentchat/contrib/test_compressible_agent.py --skip-openai
coverage xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
Expand All @@ -120,7 +112,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -140,18 +132,12 @@ jobs:
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
fi
- name: Test GPTAssistantAgent
if: matrix.python-version != '3.11' # diversify the python versions
run: |
pytest test/agentchat/contrib/test_gpt_assistant.py --skip-openai
- name: Coverage
if: matrix.python-version == '3.11'
run: |
pip install coverage>=5.3
coverage run -a -m pytest test/agentchat/contrib/test_gpt_assistant.py --skip-openai
coverage xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
Expand All @@ -163,7 +149,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -183,18 +169,12 @@ jobs:
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
fi
- name: Test TeachableAgent
if: matrix.python-version != '3.9' # diversify the python versions
run: |
pytest test/agentchat/contrib/test_teachable_agent.py --skip-openai
- name: Coverage
if: matrix.python-version == '3.9'
run: |
pip install coverage>=5.3
coverage run -a -m pytest test/agentchat/contrib/test_teachable_agent.py --skip-openai
coverage xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.9'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
Expand All @@ -206,7 +186,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -226,18 +206,12 @@ jobs:
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
fi
- name: Test WebSurfer
if: matrix.python-version != '3.10' # diversify the python versions
run: |
pytest test/test_browser_utils.py test/agentchat/contrib/test_web_surfer.py --skip-openai
- name: Coverage
if: matrix.python-version == '3.10'
run: |
pip install coverage>=5.3
coverage run -a -m pytest test/test_browser_utils.py test/agentchat/contrib/test_web_surfer.py --skip-openai
coverage xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
Expand All @@ -249,7 +223,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -269,17 +243,12 @@ jobs:
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
fi
- name: Test LMM and LLaVA
run: |
pytest test/agentchat/contrib/test_img_utils.py test/agentchat/contrib/test_lmm.py test/agentchat/contrib/test_llava.py --skip-openai
- name: Coverage
if: matrix.python-version == '3.10'
run: |
pip install coverage>=5.3
coverage run -a -m pytest test/agentchat/contrib/test_img_utils.py test/agentchat/contrib/test_lmm.py test/agentchat/contrib/test_llava.py --skip-openai
coverage xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
Expand Down
2 changes: 1 addition & 1 deletion autogen/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.8"
__version__ = "0.2.9"
1 change: 0 additions & 1 deletion notebook/agentchat_cost_token_tracking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@
}
],
"source": [
"\n",
"assistant = AssistantAgent(\n",
" \"assistant\",\n",
" system_message=\"You are a helpful assistant.\",\n",
Expand Down
2 changes: 1 addition & 1 deletion notebook/agentchat_function_call_currency_calculator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
" quote_currency: Annotated[CurrencySymbol, \"Quote currency\"] = \"EUR\",\n",
") -> str:\n",
" quote_amount = exchange_rate(base_currency, quote_currency) * base_amount\n",
" return f\"{quote_amount} {quote_currency}\"\n"
" return f\"{quote_amount} {quote_currency}\""
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion notebook/agentchat_oai_assistant_retrieval.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
" \"config_list\": config_list,\n",
" \"assistant_id\": assistant_id,\n",
" \"tools\": [{\"type\": \"retrieval\"}],\n",
" \"file_ids\": [\"file-CmlT0YKLB3ZCdHmslF9FOv69\"]\n",
" \"file_ids\": [\"file-CmlT0YKLB3ZCdHmslF9FOv69\"],\n",
" # add id of an existing file in your openai account\n",
" # in this case I added the implementation of conversable_agent.py\n",
"}\n",
Expand Down
1 change: 0 additions & 1 deletion samples/apps/autogen-studio/notebooks/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
}
],
"source": [
"\n",
"# load an agent specification in JSON\n",
"agent_spec = json.load(open(\"agent_spec.json\"))\n",
"\n",
Expand Down
3 changes: 2 additions & 1 deletion test/test_browser_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import requests
import hashlib
import re
import math

from agentchat.test_assistant_agent import KEY_LOC # noqa: E402

Expand Down Expand Up @@ -78,7 +79,7 @@ def test_simple_text_browser():
assert BLOG_POST_STRING in browser.page_content

# Check if page splitting works
approx_pages = int(len(browser.page_content) / viewport_size + 0.5) # May be fewer, since it aligns to word breaks
approx_pages = math.ceil(len(browser.page_content) / viewport_size) # May be fewer, since it aligns to word breaks
assert len(browser.viewport_pages) <= approx_pages
assert abs(len(browser.viewport_pages) - approx_pages) <= 1 # allow only a small deviation
assert browser.viewport_pages[0][0] == 0
Expand Down

0 comments on commit fd0094c

Please sign in to comment.