An agent implementation of MathChat #430
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: OpenAI | |
on: | |
pull_request: | |
branches: ['main'] | |
paths: | |
- 'flaml/autogen/**' | |
- 'test/autogen/**' | |
- 'notebook/autogen_openai_completion.ipynb' | |
- 'notebook/autogen_chatgpt_gpt4.ipynb' | |
- '.github/workflows/openai.yml' | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.9", "3.10", "3.11"] | |
runs-on: ${{ matrix.os }} | |
environment: openai | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install packages and dependencies | |
run: | | |
docker --version | |
python -m pip install --upgrade pip wheel | |
pip install -e .[autogen,blendsearch] | |
python -c "import flaml" | |
pip install coverage pytest datasets | |
- name: Coverage | |
if: matrix.python-version == '3.9' | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} | |
AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }} | |
run: | | |
coverage run -a -m pytest test/autogen | |
coverage xml | |
- name: Coverage and check notebook outputs | |
if: matrix.python-version != '3.9' | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} | |
AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }} | |
run: | | |
pip install nbconvert nbformat ipykernel | |
coverage run -a -m pytest test/autogen/oai/test_notebook.py | |
coverage xml | |
cat "$(pwd)/test/autogen/oai/executed_openai_notebook_output.txt" | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests |