-
Notifications
You must be signed in to change notification settings - Fork 901
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin' into shimin/fix_data_scrub
- Loading branch information
Showing
169 changed files
with
40,098 additions
and
608 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,7 +140,8 @@ | |
"pkill", | ||
"pgrep", | ||
"Hwfoxydrg", | ||
"llms" | ||
"llms", | ||
"vcrpy" | ||
], | ||
"allowCompoundWords": true | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: step_merge_main | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Merge main to current branch | ||
working-directory: ${{ github.workspace }} | ||
shell: pwsh | ||
run: | | ||
git config --global user.name 'prompt flow fundamental' | ||
git config --global user.email '[email protected]' | ||
git pull --no-ff origin main |
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 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 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 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 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 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
100 changes: 100 additions & 0 deletions
100
.github/workflows/promptflow-sdk-cli-azure-e2e-test.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
name: promptflow-sdk-cli-azure-e2e-test | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- src/promptflow/** | ||
- scripts/** | ||
- '**promptflow-sdk-cli-azure-e2e-test.yml' | ||
workflow_dispatch: | ||
|
||
env: | ||
packageSetupType: promptflow_with_extra | ||
testWorkingDirectory: ${{ github.workspace }}/src/promptflow | ||
PYTHONPATH: ${{ github.workspace }}/src/promptflow | ||
IS_IN_CI_PIPELINE: "true" | ||
PROMPT_FLOW_TEST_RUN_LIVE: "false" | ||
PROMPT_FLOW_SKIP_LIVE_RECORDING: "false" | ||
|
||
jobs: | ||
sdk_cli_azure_e2e_test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Display and Set Environment Variables | ||
run: | | ||
if [ "ubuntu-latest" == "${{ matrix.os }}" ]; then | ||
export pyVersion="3.9"; | ||
elif [ "macos-latest" == "${{ matrix.os }}" ]; then | ||
export pyVersion="3.10"; | ||
else | ||
echo "Unsupported OS: ${{ matrix.os }}"; | ||
exit 1; | ||
fi | ||
env | sort >> $GITHUB_OUTPUT | ||
id: display_env | ||
shell: bash -el {0} | ||
|
||
- name: Python Setup - ${{ matrix.os }} - Python Version ${{ steps.display_env.outputs.pyVersion }} | ||
uses: "./.github/actions/step_create_python_environment" | ||
with: | ||
pythonVersion: ${{ steps.display_env.outputs.pyVersion }} | ||
|
||
- name: Build wheel | ||
uses: "./.github/actions/step_sdk_setup" | ||
with: | ||
setupType: ${{ env.packageSetupType }} | ||
scriptPath: ${{ env.testWorkingDirectory }} | ||
|
||
- name: Get number of CPU cores | ||
uses: SimenB/github-actions-cpu-cores@v1 | ||
id: cpu-cores | ||
|
||
- name: Run Test | ||
shell: pwsh | ||
working-directory: ${{ env.testWorkingDirectory }} | ||
run: | | ||
gci env:* | sort-object name | ||
python "../../scripts/building/run_coverage_tests.py" ` | ||
-p promptflow ` | ||
-t ${{ github.workspace }}/src/promptflow/tests/sdk_cli_azure_test/e2etests ` | ||
-l eastus ` | ||
-m "e2etest" ` | ||
-n ${{ steps.cpu-cores.outputs.count }} ` | ||
--coverage-config ${{ github.workspace }}/src/promptflow/tests/sdk_cli_test/.coveragerc | ||
- name: Upload Test Results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Test Results (Python ${{ steps.display_env.outputs.pyVersion }}) (OS ${{ matrix.os }}) | ||
path: | | ||
${{ env.testWorkingDirectory }}/*.xml | ||
${{ env.testWorkingDirectory }}/htmlcov/ | ||
publish-test-results: | ||
name: "Publish Tests Results" | ||
needs: sdk_cli_azure_e2e_test | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
if: always() | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: Publish Test Results | ||
uses: "./.github/actions/step_publish_test_results" | ||
with: | ||
testActionFileName: promptflow-sdk-cli-azure-e2e-test.yml | ||
testResultTitle: promptflow SDK CLI Azure E2E Test Result | ||
osVersion: ubuntu-latest | ||
pythonVersion: 3.9 | ||
coverageThreshold: 40 | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
context: test/sdk_cli |
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 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
89 changes: 89 additions & 0 deletions
89
.github/workflows/samples_flows_standard_flow_with_enabled_by_value.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# 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_flows_standard_flow_with_enabled_by_value | ||
on: | ||
schedule: | ||
- cron: "27 22 * * *" # Every day starting at 6:27 BJT | ||
pull_request: | ||
branches: [ main ] | ||
paths: [ examples/flows/standard/flow-with-enabled-by-value/**, examples/*requirements.txt, .github/workflows/samples_flows_standard_flow_with_enabled_by_value.yml ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
samples_readme_ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Python 3.9 environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
- name: Generate config.json | ||
run: echo '${{ secrets.TEST_WORKSPACE_CONFIG_JSON_CANARY }}' > ${{ github.workspace }}/examples/config.json | ||
- 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/flows/standard/flow-with-enabled-by-value | ||
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 | ||
- name: Create run.yml | ||
working-directory: examples/flows/standard/flow-with-enabled-by-value | ||
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/flows/standard/flow-with-enabled-by-value/README.md | ||
working-directory: ${{ github.workspace }} | ||
run: | | ||
python scripts/readme/extract_steps_from_readme.py -f examples/flows/standard/flow-with-enabled-by-value/README.md -o examples/flows/standard/flow-with-enabled-by-value | ||
- name: Cat script | ||
working-directory: examples/flows/standard/flow-with-enabled-by-value | ||
run: | | ||
cat bash_script.sh | ||
- name: Run scripts | ||
working-directory: examples/flows/standard/flow-with-enabled-by-value | ||
run: | | ||
export aoai_api_key=${{secrets.AOAI_API_KEY_TEST }} | ||
export aoai_api_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: Pip List for Debug | ||
if : ${{ always() }} | ||
working-directory: examples/flows/standard/flow-with-enabled-by-value | ||
run: | | ||
pip list | ||
- name: Upload artifact | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: artifact | ||
path: examples/flows/standard/flow-with-enabled-by-value/bash_script.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# 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_runmanagement_runmanagement | ||
on: | ||
schedule: | ||
- cron: "51 20 * * *" # Every day starting at 4:51 BJT | ||
pull_request: | ||
branches: [ main ] | ||
paths: [ examples/**, .github/workflows/samples_runmanagement_runmanagement.yml ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
samples_notebook_ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Generate config.json | ||
run: echo '${{ secrets.TEST_WORKSPACE_CONFIG_JSON_CANARY }}' > ${{ 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/tutorials/run-management | ||
run: | | ||
papermill -k python run-management.ipynb run-management.output.ipynb | ||
- name: Upload artifact | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: artifact | ||
path: examples/tutorials/run-management |
Oops, something went wrong.