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

Sample for release 1.10.0 #2856

Merged
merged 41 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
55fbcd9
Sample for release 1.10: init commit
wangchao1230 Apr 17, 2024
ac07df9
update
wangchao1230 Apr 18, 2024
3213a84
Merge branch 'main' into clwan/sample_1_10
wangchao1230 Apr 18, 2024
061ebae
Merge branch 'main' into clwan/sample_1_10
wangchao1230 Apr 19, 2024
60f9e58
update requirements to use change in current branch
wangchao1230 Apr 19, 2024
069ab47
Merge branch 'main' into clwan/sample_1_10
wangchao1230 Apr 19, 2024
852710c
Merge branch 'main' into clwan/sample_1_10
wangchao1230 Apr 22, 2024
5aa8960
Merge branch 'main' into clwan/sample_1_10
D-W- Apr 22, 2024
f60c351
[Sample] Add model config sample (#2906)
D-W- Apr 22, 2024
fae5fec
Merge branch 'main' into clwan/sample_1_10
wangchao1230 Apr 22, 2024
1608a66
fix
wangchao1230 Apr 22, 2024
3995dbb
Merge branch 'clwan/sample_1_10' of https://github.com/microsoft/prom…
wangchao1230 Apr 22, 2024
bc04bcb
update flex-flows/chat-basic
wangchao1230 Apr 22, 2024
93be59b
Merge branch 'main' into clwan/sample_1_10
wangchao1230 Apr 23, 2024
eafc30a
add configuration override to prompty example (#2873)
lalala123123 Apr 23, 2024
4c611de
Merge branch 'main' into clwan/sample_1_10
wangchao1230 Apr 23, 2024
fb4ec9f
update
wangchao1230 Apr 23, 2024
24c6571
update
wangchao1230 Apr 24, 2024
a6007f1
update
wangchao1230 Apr 24, 2024
0ae120f
fix
wangchao1230 Apr 24, 2024
39c6734
refine
wangchao1230 Apr 24, 2024
e088edc
refine
wangchao1230 Apr 24, 2024
49e7c54
update
wangchao1230 Apr 24, 2024
a55c209
update
wangchao1230 Apr 24, 2024
96cc3a0
update requirements
D-W- Apr 24, 2024
f734398
fix notebook
D-W- Apr 24, 2024
33379b8
update data
D-W- Apr 24, 2024
b292c44
Merge branch 'main' into clwan/sample_1_10
D-W- Apr 24, 2024
e574088
fix
wangchao1230 Apr 24, 2024
e92e536
Merge branch 'clwan/sample_1_10' of https://github.com/microsoft/prom…
wangchao1230 Apr 24, 2024
de99a63
Merge branch 'main' into clwan/sample_1_10
YingChen1996 Apr 25, 2024
c3ec13f
update
wangchao1230 Apr 25, 2024
6dfcd87
constraint openai version in basic
wangchao1230 Apr 25, 2024
d2dfdcc
Merge branch 'main' into clwan/sample_1_10
wangchao1230 Apr 25, 2024
0623080
ci: switch to private 1.10.0
elliotzh Apr 24, 2024
7effe89
update
wangchao1230 Apr 26, 2024
b6ebe4a
update
wangchao1230 Apr 26, 2024
13aaa8c
Comment chat-with-prompty eval section
0mza987 Apr 26, 2024
e34bb13
Revert "Comment chat-with-prompty eval section"
0mza987 Apr 26, 2024
e2032c5
fix
wangchao1230 Apr 26, 2024
23aa8a5
fix: azure
elliotzh Apr 26, 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
110 changes: 110 additions & 0 deletions .github/workflows/samples_flex_flows_chat_stream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# This code is autogenerated.
# Code is generated by running custom script: python3 readme.py
# Any manual changes to this file may cause incorrect behavior.
# Any manual changes will be overwritten if the code is regenerated.

name: samples_flex_flows_chat_stream
on:
schedule:
- cron: "7 19 * * *" # Every day starting at 3:7 BJT
pull_request:
branches: [ main ]
paths: [ examples/flex-flows/chat-stream/**, examples/*requirements.txt, .github/workflows/samples_flex_flows_chat_stream.yml ]
workflow_dispatch:

env:
IS_IN_CI_PIPELINE: "true"

jobs:
samples_flex_flows_chat_stream:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python 3.9 environment
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Prepare requirements
working-directory: examples
run: |
if [[ -e requirements.txt ]]; then
python -m pip install --upgrade pip
pip install -r requirements.txt
fi
- name: Prepare dev requirements
working-directory: examples
run: |
python -m pip install --upgrade pip
pip install -r dev_requirements.txt
- name: Refine .env file
working-directory: examples/flex-flows/chat-stream
run: |
AOAI_API_KEY=${{ secrets.AOAI_API_KEY_TEST }}
AOAI_API_ENDPOINT=${{ secrets.AOAI_API_ENDPOINT_TEST }}
AOAI_API_ENDPOINT=$(echo ${AOAI_API_ENDPOINT//\//\\/})
if [[ -e .env.example ]]; then
echo "env replacement"
sed -i -e "s/<your_AOAI_key>/$AOAI_API_KEY/g" -e "s/<your_AOAI_endpoint>/$AOAI_API_ENDPOINT/g" .env.example
mv .env.example .env
fi
if [[ -e ../.env.example ]]; then
echo "env replacement"
sed -i -e "s/<your_AOAI_key>/$AOAI_API_KEY/g" -e "s/<your_AOAI_endpoint>/$AOAI_API_ENDPOINT/g" ../.env.example
mv ../.env.example ../.env
fi
- name: Create run.yml
working-directory: examples/flex-flows/chat-stream
run: |
gpt_base=${{ secrets.AOAI_API_ENDPOINT_TEST }}
gpt_base=$(echo ${gpt_base//\//\\/})
if [[ -e run.yml ]]; then
sed -i -e "s/\${azure_open_ai_connection.api_key}/${{ secrets.AOAI_API_KEY_TEST }}/g" -e "s/\${azure_open_ai_connection.api_base}/$gpt_base/g" run.yml
fi
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Extract Steps examples/flex-flows/chat-stream/README.md
working-directory: ${{ github.workspace }}
run: |
python scripts/readme/extract_steps_from_readme.py -f examples/flex-flows/chat-stream/README.md -o examples/flex-flows/chat-stream
- name: Cat script
working-directory: examples/flex-flows/chat-stream
run: |
cat bash_script.sh
- name: Run scripts against canary workspace (scheduled runs only)
if: github.event_name == 'schedule'
working-directory: examples/flex-flows/chat-stream
run: |
export aoai_api_key=${{secrets.AOAI_API_KEY_TEST }}
export aoai_api_endpoint=${{ secrets.AOAI_API_ENDPOINT_TEST }}
export AZURE_OPENAI_API_KEY=${{secrets.AOAI_API_KEY_TEST }}
export AZURE_OPENAI_ENDPOINT=${{ secrets.AOAI_API_ENDPOINT_TEST }}
export test_workspace_sub_id=${{ secrets.TEST_WORKSPACE_SUB_ID }}
export test_workspace_rg=${{ secrets.TEST_WORKSPACE_RG }}
export test_workspace_name=${{ secrets.TEST_WORKSPACE_NAME_CANARY }}
bash bash_script.sh
- name: Run scripts against production workspace
if: github.event_name != 'schedule'
working-directory: examples/flex-flows/chat-stream
run: |
export aoai_api_key=${{secrets.AOAI_API_KEY_TEST }}
export aoai_api_endpoint=${{ secrets.AOAI_API_ENDPOINT_TEST }}
export AZURE_OPENAI_API_KEY=${{secrets.AOAI_API_KEY_TEST }}
export AZURE_OPENAI_ENDPOINT=${{ secrets.AOAI_API_ENDPOINT_TEST }}
export test_workspace_sub_id=${{ secrets.TEST_WORKSPACE_SUB_ID }}
export test_workspace_rg=${{ secrets.TEST_WORKSPACE_RG }}
export test_workspace_name=${{ secrets.TEST_WORKSPACE_NAME_PROD }}
bash bash_script.sh
- name: Pip List for Debug
if : ${{ always() }}
working-directory: examples/flex-flows/chat-stream
run: |
pip list
- name: Upload artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: artifact
path: examples/flex-flows/chat-stream/bash_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This code is autogenerated.
# Code is generated by running custom script: python3 readme.py
# Any manual changes to this file may cause incorrect behavior.
# Any manual changes will be overwritten if the code is regenerated.

name: samples_flexflows_chatbasic_chatwithclassbasedflow
on:
schedule:
- cron: "32 22 * * *" # Every day starting at 6:32 BJT
pull_request:
branches: [ main ]
paths: [ examples/flex-flows/chat-basic/**, examples/*requirements.txt, .github/workflows/samples_flexflows_chatbasic_chatwithclassbasedflow.yml ]
workflow_dispatch:

env:
IS_IN_CI_PIPELINE: "true"

jobs:
samples_flexflows_chatbasic_chatwithclassbasedflow:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Setup Python 3.9 environment
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Prepare requirements
run: |
python -m pip install --upgrade pip
pip install -r ${{ github.workspace }}/examples/requirements.txt
pip install -r ${{ github.workspace }}/examples/dev_requirements.txt
- name: setup .env file
working-directory: examples/flex-flows/chat-basic
run: |
AOAI_API_KEY=${{ secrets.AOAI_API_KEY_TEST }}
AOAI_API_ENDPOINT=${{ secrets.AOAI_API_ENDPOINT_TEST }}
AOAI_API_ENDPOINT=$(echo ${AOAI_API_ENDPOINT//\//\\/})
if [[ -e .env.example ]]; then
echo "env replacement"
sed -i -e "s/<your_AOAI_key>/$AOAI_API_KEY/g" -e "s/<your_AOAI_endpoint>/$AOAI_API_ENDPOINT/g" .env.example
mv .env.example .env
fi
if [[ -e ../.env.example ]]; then
echo "env replacement"
sed -i -e "s/<your_AOAI_key>/$AOAI_API_KEY/g" -e "s/<your_AOAI_endpoint>/$AOAI_API_ENDPOINT/g" ../.env.example
mv ../.env.example ../.env
fi
- name: Create Aoai Connection
run: pf connection create -f ${{ github.workspace }}/examples/connections/azure_openai.yml --set api_key="${{ secrets.AOAI_API_KEY_TEST }}" api_base="${{ secrets.AOAI_API_ENDPOINT_TEST }}"
- name: Test Notebook
working-directory: examples/flex-flows/chat-basic
run: |
papermill -k python chat-with-class-based-flow.ipynb chat-with-class-based-flow.output.ipynb
- name: Upload artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: artifact
path: examples/flex-flows/chat-basic
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This code is autogenerated.
# Code is generated by running custom script: python3 readme.py
# Any manual changes to this file may cause incorrect behavior.
# Any manual changes will be overwritten if the code is regenerated.

name: samples_flexflows_chatbasic_chatwithclassbasedflowazure
on:
schedule:
- cron: "46 20 * * *" # Every day starting at 4:46 BJT
pull_request:
branches: [ main ]
paths: [ examples/flex-flows/chat-basic/**, examples/*requirements.txt, .github/workflows/samples_flexflows_chatbasic_chatwithclassbasedflowazure.yml ]
workflow_dispatch:

env:
IS_IN_CI_PIPELINE: "true"

jobs:
samples_flexflows_chatbasic_chatwithclassbasedflowazure:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate config.json for canary workspace (scheduled runs only)
if: github.event_name == 'schedule'
run: echo '${{ secrets.TEST_WORKSPACE_CONFIG_JSON_CANARY }}' > ${{ github.workspace }}/examples/config.json
- name: Generate config.json for production workspace
if: github.event_name != 'schedule'
run: echo '${{ secrets.EXAMPLE_WORKSPACE_CONFIG_JSON_PROD }}' > ${{ github.workspace }}/examples/config.json
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Setup Python 3.9 environment
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Prepare requirements
run: |
python -m pip install --upgrade pip
pip install -r ${{ github.workspace }}/examples/requirements.txt
pip install -r ${{ github.workspace }}/examples/dev_requirements.txt
- name: Create Aoai Connection
run: pf connection create -f ${{ github.workspace }}/examples/connections/azure_openai.yml --set api_key="${{ secrets.AOAI_API_KEY_TEST }}" api_base="${{ secrets.AOAI_API_ENDPOINT_TEST }}"
- name: Test Notebook
working-directory: examples/flex-flows/chat-basic
run: |
papermill -k python chat-with-class-based-flow-azure.ipynb chat-with-class-based-flow-azure.output.ipynb
- name: Upload artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: artifact
path: examples/flex-flows/chat-basic
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This code is autogenerated.
# Code is generated by running custom script: python3 readme.py
# Any manual changes to this file may cause incorrect behavior.
# Any manual changes will be overwritten if the code is regenerated.

name: samples_flexflows_chatstream_chatstreamwithflexflow
on:
schedule:
- cron: "28 21 * * *" # Every day starting at 5:28 BJT
pull_request:
branches: [ main ]
paths: [ examples/flex-flows/chat-stream/**, examples/*requirements.txt, .github/workflows/samples_flexflows_chatstream_chatstreamwithflexflow.yml ]
workflow_dispatch:

env:
IS_IN_CI_PIPELINE: "true"

jobs:
samples_flexflows_chatstream_chatstreamwithflexflow:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Setup Python 3.9 environment
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Prepare requirements
run: |
python -m pip install --upgrade pip
pip install -r ${{ github.workspace }}/examples/requirements.txt
pip install -r ${{ github.workspace }}/examples/dev_requirements.txt
- name: setup .env file
working-directory: examples/flex-flows/chat-stream
run: |
AOAI_API_KEY=${{ secrets.AOAI_API_KEY_TEST }}
AOAI_API_ENDPOINT=${{ secrets.AOAI_API_ENDPOINT_TEST }}
AOAI_API_ENDPOINT=$(echo ${AOAI_API_ENDPOINT//\//\\/})
if [[ -e .env.example ]]; then
echo "env replacement"
sed -i -e "s/<your_AOAI_key>/$AOAI_API_KEY/g" -e "s/<your_AOAI_endpoint>/$AOAI_API_ENDPOINT/g" .env.example
mv .env.example .env
fi
if [[ -e ../.env.example ]]; then
echo "env replacement"
sed -i -e "s/<your_AOAI_key>/$AOAI_API_KEY/g" -e "s/<your_AOAI_endpoint>/$AOAI_API_ENDPOINT/g" ../.env.example
mv ../.env.example ../.env
fi
- name: Create Aoai Connection
run: pf connection create -f ${{ github.workspace }}/examples/connections/azure_openai.yml --set api_key="${{ secrets.AOAI_API_KEY_TEST }}" api_base="${{ secrets.AOAI_API_ENDPOINT_TEST }}"
- name: Test Notebook
working-directory: examples/flex-flows/chat-stream
run: |
papermill -k python chat-stream-with-flex-flow.ipynb chat-stream-with-flex-flow.output.ipynb
- name: Upload artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: artifact
path: examples/flex-flows/chat-stream
Loading
Loading