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

[Draft for Initial Review] Automating Model Autotracing and Uploading Process #198

Closed
Closed
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
55c6f26
Checkout workflow-nox
thanawan-atc Jul 20, 2023
ae631d3
Correct linting
thanawan-atc Jul 20, 2023
f1a3473
Add nox session
thanawan-atc Jul 20, 2023
1505827
GitHub Actions Workflow - Update MODEL_UPLOAD_HISTORY.md (sentence-tr…
thanawan-atc Jul 20, 2023
30790c9
Create & Raise a PR
thanawan-atc Jul 21, 2023
28605bc
Update model_uploader.yml
thanawan-atc Jul 21, 2023
497e448
Merge workflow-nox-many-branches
thanawan-atc Jul 21, 2023
110a0f8
Add pr_body
thanawan-atc Jul 21, 2023
72758c4
Delete utils/model_uploader/upload_history directory
thanawan-atc Jul 21, 2023
4144ec9
Corrent linting
thanawan-atc Jul 21, 2023
6572e06
Update concurrency
thanawan-atc Jul 21, 2023
1a4b860
GitHub Actions Workflow: Update Model Upload History - sentence-trans…
thanawan-atc Jul 21, 2023
5abce13
GitHub Actions Workflow: Update Model Upload History - sentence-trans…
thanawan-atc Jul 21, 2023
91f5647
Merge pull request #74 from thanawan-atc/model-uploader/5626213628
thanawan-atc Jul 21, 2023
c9fdede
GitHub Actions Workflow: Update Model Upload History - sentence-trans…
thanawan-atc Jul 21, 2023
a3fdaa1
Merge branch 'workflow-for-review' into model-uploader/5626209764
thanawan-atc Jul 21, 2023
d0b64af
Merge pull request #75 from thanawan-atc/model-uploader/5626209764
thanawan-atc Jul 21, 2023
0f9194b
Merge branch 'workflow-for-review' into model-uploader/5626206940
thanawan-atc Jul 21, 2023
46d2964
Merge pull request #76 from thanawan-atc/model-uploader/5626206940
thanawan-atc Jul 21, 2023
0a0547c
Rename step
thanawan-atc Jul 21, 2023
4dc7bae
Rename step
thanawan-atc Jul 21, 2023
401bf5d
Handle CHANGELOG.md
thanawan-atc Jul 21, 2023
09ba81d
Update model_uploader.yml
thanawan-atc Jul 21, 2023
f3bbd73
Correct linting
thanawan-atc Jul 21, 2023
de23c93
Update update_changelog_md.py
thanawan-atc Jul 21, 2023
dffbfed
Delete utils/model_uploader/upload_history directory
thanawan-atc Jul 21, 2023
8b4a7c6
Reformat PR body
thanawan-atc Jul 21, 2023
f541398
Remove print()
thanawan-atc Jul 24, 2023
57404a8
Edit run-repository.sh
thanawan-atc Jul 24, 2023
89ca2d4
Add comment to noxfile.py
thanawan-atc Jul 24, 2023
c6b0e89
Edit py file
thanawan-atc Jul 24, 2023
45bd598
Use env variables
thanawan-atc Jul 24, 2023
2d52371
Fix bug
thanawan-atc Jul 24, 2023
f107896
Fix bug
thanawan-atc Jul 24, 2023
3860628
Fix bug
thanawan-atc Jul 25, 2023
27d0e97
Fix bug
thanawan-atc Jul 25, 2023
6d68b78
Update model_uploader.yml
thanawan-atc Jul 25, 2023
7cd8f80
Update model_uploader.yml
thanawan-atc Jul 25, 2023
22f6ec8
Fix bug
thanawan-atc Jul 25, 2023
d3c0e2c
Fix bug
thanawan-atc Jul 25, 2023
9ba7f4b
Fix bug
thanawan-atc Jul 25, 2023
53327e7
Fix bug
thanawan-atc Jul 25, 2023
1b9ecf1
Fix bug
thanawan-atc Jul 25, 2023
c3e6b67
Fix bug
thanawan-atc Jul 25, 2023
4fac105
Fix bug
thanawan-atc Jul 25, 2023
5728397
Fix bug
thanawan-atc Jul 25, 2023
5dbe468
Fix bug
thanawan-atc Jul 25, 2023
2c1a668
Fix bug
thanawan-atc Jul 25, 2023
7232c55
Update model_uploader.yml
thanawan-atc Jul 25, 2023
85a4443
Merge pull request #94 from thanawan-atc/experiment-workflow-for-review
thanawan-atc Jul 25, 2023
0d8a4a1
Update model_autotracing.py
thanawan-atc Jul 25, 2023
35ee827
Update model_autotracing.py
thanawan-atc Jul 25, 2023
9bf8250
Correct linting
thanawan-atc Jul 25, 2023
eb5eca2
Fix bug
thanawan-atc Jul 25, 2023
2b4a2d3
Remove concurrency
thanawan-atc Jul 25, 2023
ed27e81
Add test information
thanawan-atc Jul 25, 2023
2cb1543
Debug
thanawan-atc Jul 25, 2023
ee77cf7
GitHub Actions Workflow: Update Model Upload History - sentence-trans…
thanawan-atc Jul 25, 2023
eff4619
GitHub Actions Workflow: Update CHANGELOG.md - sentence-transformers/…
thanawan-atc Jul 25, 2023
6d0c063
Merge pull request #101 from thanawan-atc/model-uploader/5660642403
thanawan-atc Jul 25, 2023
3327cd8
Restrict branch
thanawan-atc Jul 26, 2023
d82e3e2
Debug
thanawan-atc Jul 26, 2023
f445b07
Draft Step 8
thanawan-atc Jul 27, 2023
049ef0f
Update model_uploader.yml
thanawan-atc Jul 28, 2023
5a9bf9c
Update model_uploader.yml
thanawan-atc Jul 28, 2023
2b92dc0
Update model_uploader.yml
thanawan-atc Jul 29, 2023
b325cc5
Debug
thanawan-atc Jul 29, 2023
939026a
Debug
thanawan-atc Jul 29, 2023
830eb6a
Debug
thanawan-atc Jul 29, 2023
417f075
Debug
thanawan-atc Jul 29, 2023
945585e
Debug
thanawan-atc Jul 29, 2023
a5f6f61
Debug
thanawan-atc Jul 29, 2023
377095f
Update model_uploader.yml
thanawan-atc Jul 29, 2023
e1f52a2
Update model_uploader.yml
thanawan-atc Jul 29, 2023
2d78630
Update model_uploader.yml
thanawan-atc Jul 29, 2023
b1515ec
Update model_uploader.yml
thanawan-atc Jul 29, 2023
61b0955
Update model_uploader.yml
thanawan-atc Jul 29, 2023
f644102
Merge experiment-license branch
thanawan-atc Jul 30, 2023
d21fc21
Update model_uploader.yml
thanawan-atc Jul 30, 2023
7f2bbb2
Update model_autotracing.py
thanawan-atc Jul 31, 2023
572640b
Debug license
thanawan-atc Jul 31, 2023
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
38 changes: 31 additions & 7 deletions .ci/run-repository.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# Called by entry point `run-test` use this script to add your repository specific test commands
# Called by entry point `run-test` use this script to add your repository specific task commands
# Once called opensearch is up and running and the following parameters are available to this script

# OPENSEARCH_VERSION -- version e.g Major.Minor.Patch(-Prelease)
Expand All @@ -16,7 +16,7 @@ set -e
echo -e "\033[34;1mINFO:\033[0m URL ${opensearch_url}\033[0m"
echo -e "\033[34;1mINFO:\033[0m EXTERNAL OS URL ${external_opensearch_url}\033[0m"
echo -e "\033[34;1mINFO:\033[0m VERSION ${OPENSEARCH_VERSION}\033[0m"
echo -e "\033[34;1mINFO:\033[0m IS_DOC: ${IS_DOC}\033[0m"
echo -e "\033[34;1mINFO:\033[0m TASK_TYPE: ${TASK_TYPE}\033[0m"
echo -e "\033[34;1mINFO:\033[0m TEST_SUITE ${TEST_SUITE}\033[0m"
echo -e "\033[34;1mINFO:\033[0m PYTHON_VERSION ${PYTHON_VERSION}\033[0m"
echo -e "\033[34;1mINFO:\033[0m PYTHON_CONNECTION_CLASS ${PYTHON_CONNECTION_CLASS}\033[0m"
Expand All @@ -33,7 +33,8 @@ docker build \
echo -e "\033[1m>>>>> Run [opensearch-project/opensearch-py-ml container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"


if [[ "$IS_DOC" == "false" ]]; then
if [[ "$TASK_TYPE" == "test" ]]; then
# Set up OpenSearch cluster & Run test (Invoked by integration.yml workflow)
thanawan-atc marked this conversation as resolved.
Show resolved Hide resolved
docker run \
--network=${network_name} \
--env "STACK_VERSION=${STACK_VERSION}" \
Expand All @@ -45,10 +46,11 @@ if [[ "$IS_DOC" == "false" ]]; then
--name opensearch-py-ml-test-runner \
opensearch-project/opensearch-py-ml \
nox -s "test-${PYTHON_VERSION}(pandas_version='${PANDAS_VERSION}')"

docker cp opensearch-py-ml-test-runner:/code/opensearch-py-ml/junit/ ./junit/

docker rm opensearch-py-ml-test-runner
else
elif [[ "$TASK_TYPE" == "doc" ]]; then
# Set up OpenSearch cluster & Run docs (Invoked by build_deploy_doc.yml workflow)
docker run \
--network=${network_name} \
--env "STACK_VERSION=${STACK_VERSION}" \
Expand All @@ -60,7 +62,29 @@ else
--name opensearch-py-ml-doc-runner \
opensearch-project/opensearch-py-ml \
nox -s docs

docker cp opensearch-py-ml-doc-runner:/code/opensearch-py-ml/docs/build/ ./docs/

docker rm opensearch-py-ml-doc-runner
fi
elif [[ "$TASK_TYPE" == "trace" ]]; then
# Set up OpenSearch cluster & Run model autotracing (Invoked by model_uploader.yml workflow)
echo -e "\033[34;1mINFO:\033[0m MODEL_ID: ${MODEL_ID}\033[0m"
echo -e "\033[34;1mINFO:\033[0m MODEL_VERSION: ${MODEL_VERSION}\033[0m"
echo -e "\033[34;1mINFO:\033[0m TRACING_FORMAT: ${TRACING_FORMAT}\033[0m"
echo -e "\033[34;1mINFO:\033[0m EMBEDDING_DIMENSION: ${EMBEDDING_DIMENSION:-N/A}\033[0m"
echo -e "\033[34;1mINFO:\033[0m POOLING_MODE: ${POOLING_MODE:-N/A}\033[0m"

docker run \
--network=${network_name} \
--env "STACK_VERSION=${STACK_VERSION}" \
--env "OPENSEARCH_URL=${opensearch_url}" \
--env "OPENSEARCH_VERSION=${OPENSEARCH_VERSION}" \
--env "TEST_SUITE=${TEST_SUITE}" \
--env "PYTHON_CONNECTION_CLASS=${PYTHON_CONNECTION_CLASS}" \
--env "TEST_TYPE=server" \
--name opensearch-py-ml-trace-runner \
opensearch-project/opensearch-py-ml \
nox -s trace -- ${MODEL_ID} ${MODEL_VERSION} ${TRACING_FORMAT} -ed ${EMBEDDING_DIMENSION} -pm ${POOLING_MODE}

docker cp opensearch-py-ml-trace-runner:/code/opensearch-py-ml/upload/ ./upload/
docker rm opensearch-py-ml-trace-runner
fi
2 changes: 1 addition & 1 deletion .ci/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export PYTHON_CONNECTION_CLASS="${PYTHON_CONNECTION_CLASS:=Urllib3HttpConnection
export CLUSTER="${1:-opensearch}"
export SECURE_INTEGRATION="${2:-true}"
export OPENSEARCH_VERSION="${3:-latest}"
export IS_DOC="${4:-false}"
export TASK_TYPE="${4:-test}"
if [[ "$SECURE_INTEGRATION" == "true" ]]; then
export OPENSEARCH_URL_EXTENSION="https"
else
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @dhrubo-os @greaa-aws @ylwu-amzn @b4sjoo @jngz-es @rbhavna
* @thanawan-atc
2 changes: 1 addition & 1 deletion .github/workflows/build_deploy_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Integ ${{ matrix.cluster }} secured=${{ matrix.secured }} version=${{matrix.entry.opensearch_version}}
run: "./.ci/run-tests ${{ matrix.cluster }} ${{ matrix.secured }} ${{ matrix.entry.opensearch_version }} true"
run: "./.ci/run-tests ${{ matrix.cluster }} ${{ matrix.secured }} ${{ matrix.entry.opensearch_version }} doc"
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/delete_model_uploader_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Delete merged branch of the model upload PRs
on:
pull_request:
types:
- closed

jobs:
delete-branch:
runs-on: ubuntu-latest
if: startsWith(github.event.pull_request.head.ref,'model-uploader/')
steps:
- name: Delete merged branch
uses: SvanBoxel/delete-merged-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Integ ${{ matrix.cluster }} secured=${{ matrix.secured }} version=${{matrix.entry.opensearch_version}}
run: "./.ci/run-tests ${{ matrix.cluster }} ${{ matrix.secured }} ${{ matrix.entry.opensearch_version }}"
run: "./.ci/run-tests ${{ matrix.cluster }} ${{ matrix.secured }} ${{ matrix.entry.opensearch_version }} test"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
Expand Down
Loading
Loading