[AutoMM] Fix pdf classficiation tutorial #7458
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
name: Continuous Integration | |
on: | |
push: | |
pull_request_target: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.event.pull_request.head.sha }} | |
cancel-in-progress: true | |
permissions: | |
id-token: write | |
pull-requests: write | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
branch_check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fail on restricted branch | |
# https://docs.github.com/en/actions/learn-github-actions/expressions#example-matching-an-array-of-strings | |
if: ${{ github.event_name == 'push' && contains(fromJSON('["cloud"]'), github.ref_name) }} | |
run: | | |
echo This is a restricted branch reserved for certain modules. Please use another branch instead | |
exit 1 | |
lint_check: | |
needs: branch_check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check if changes beside docs | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
other_than_docs: | |
- '!(docs/**)**' | |
- name: Lint Check on AWS Batch | |
if: steps.changes.outputs.other_than_docs == 'true' | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-CPU | |
job-name: AutoGluon-LintCheck | |
command: chmod +x ./.github/workflow_scripts/lint_check.sh && ./.github/workflow_scripts/lint_check.sh | |
package_diff: | |
needs: lint_check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Miniconda | |
uses: conda-incubator/setup-miniconda@v2.0.0 | |
with: | |
activate-environment: autogluon_py3 | |
environment-file: .github/workflows_env/unittest_env.yml | |
auto-update-conda: true | |
python-version: "3.10" | |
- name: Setup Env Vars | |
uses: ./.github/actions/setup-env-vars | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
role-to-assume: arn:aws:iam::369469875935:role/AutoGluonCiCopyDocs | |
role-duration-seconds: 3600 | |
aws-region: us-east-1 | |
- name: Install all dependencies | |
shell: bash -l {0} | |
run: | | |
chmod +x ./full_install.sh && ./full_install.sh | |
- name: Store package versions | |
# Keep shell open to pick pip from autogluon_py3 | |
shell: bash -l {0} | |
run: | | |
cur_date=$(date +%Y-%m-%d-%H:%M:%S) | |
echo "Timestamp: $cur_date" > ./package_versions_${cur_date}.txt | |
echo "Package Versions:" >> ./package_versions_${cur_date}.txt | |
pip freeze >> ./package_versions_${cur_date}.txt | |
- name: Fetch previous version file and compare | |
run: | | |
/bin/bash ./.github/workflow_scripts/version_diff.sh | |
- name: Update pull request with diff | |
env: | |
GH_TOKEN: ${{ secrets.PAT }} | |
run: | | |
pr_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") | |
comment_body=$(jq -n --arg body "`cat ./table_output.txt`" '{body: $body}') | |
curl -X POST \ | |
-H "Authorization: token $GH_TOKEN" \ | |
-H "Content-Type: application/json" \ | |
-d "$comment_body" \ | |
"https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${pr_number}/comments" | |
- name: Upload the current package versions | |
run: | | |
aws s3 cp ./package_versions_* "s3://autogluon-ci/package_versions/" | |
test_common: | |
needs: lint_check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check if changes beside docs | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
other_than_docs: | |
- '!(docs/**)**' | |
- name: Test Common on AWS Batch | |
if: steps.changes.outputs.other_than_docs == 'true' | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-CPU | |
job-name: AutoGluon-Common | |
command: chmod +x ./.github/workflow_scripts/test_common.sh && ./.github/workflow_scripts/test_common.sh | |
test_core: | |
needs: lint_check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check if changes beside docs | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
other_than_docs: | |
- '!(docs/**)**' | |
- name: Test Core on AWS Batch | |
if: steps.changes.outputs.other_than_docs == 'true' | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-CPU | |
job-name: AutoGluon-Core | |
command: chmod +x ./.github/workflow_scripts/test_core.sh && ./.github/workflow_scripts/test_core.sh | |
test_features: | |
needs: lint_check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check if changes beside docs | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
other_than_docs: | |
- '!(docs/**)**' | |
- name: Test Features on AWS Batch | |
if: steps.changes.outputs.other_than_docs == 'true' | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-CPU | |
job-name: AutoGluon-Features | |
command: chmod +x ./.github/workflow_scripts/test_features.sh && ./.github/workflow_scripts/test_features.sh | |
test_tabular: | |
needs: lint_check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check if changes beside docs | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
other_than_docs: | |
- '!(docs/**)**' | |
other_than_timeseries: | |
- '!(timeseries/**)**' | |
- name: Test Tabular on AWS Batch | |
if: steps.changes.outputs.other_than_docs == 'true' && steps.changes.outputs.other_than_timeseries == 'true' | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-GPU | |
job-name: AutoGluon-Tabular | |
command: chmod +x ./.github/workflow_scripts/test_tabular.sh && ./.github/workflow_scripts/test_tabular.sh | |
test_tabular_lite: | |
needs: lint_check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check if changes beside docs | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
other_than_docs: | |
- '!(docs/**)**' | |
other_than_timeseries: | |
- '!(timeseries/**)**' | |
- name: Test AutoGluonLite package via Pyodide on AWS Batch | |
if: steps.changes.outputs.other_than_docs == 'true' && steps.changes.outputs.other_than_timeseries == 'true' | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-WASM | |
job-name: AutoGluon-Lite | |
command: chmod +x ./.github/workflow_scripts/test_tabular_lite.sh && ./.github/workflow_scripts/test_tabular_lite.sh | |
# test_eda: | |
# needs: lint_check | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v2 | |
# - name: Check if changes beside docs | |
# uses: dorny/paths-filter@v2 | |
# id: changes | |
# with: | |
# filters: | | |
# other_than_docs: | |
# - '!(docs/**)**' | |
# - name: Test EDA on AWS Batch | |
# if: steps.changes.outputs.other_than_docs == 'true' | |
# uses: ./.github/actions/submit-job | |
# with: | |
# job-type: CI-CPU | |
# job-name: AutoGluon-EDA | |
# command: chmod +x ./.github/workflow_scripts/test_eda.sh && ./.github/workflow_scripts/test_eda.sh | |
test_multimodal_predictor: | |
needs: lint_check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check if changes beside docs | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
other_than_docs: | |
- '!(docs/**)**' | |
other_than_timeseries: | |
- '!(timeseries/**)**' | |
- name: Test Multimodal Predictor on AWS Batch | |
if: steps.changes.outputs.other_than_docs == 'true' && steps.changes.outputs.other_than_timeseries == 'true' | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-GPU | |
job-name: AutoGluon-Multimodal-Predictor | |
command: chmod +x ./.github/workflow_scripts/test_multimodal_predictor.sh && ./.github/workflow_scripts/test_multimodal_predictor.sh --run_single_gpu | |
test_multimodal_others: | |
needs: lint_check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check if changes beside docs | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
other_than_docs: | |
- '!(docs/**)**' | |
other_than_timeseries: | |
- '!(timeseries/**)**' | |
- name: Test Multimodal Others on AWS Batch | |
if: steps.changes.outputs.other_than_docs == 'true' && steps.changes.outputs.other_than_timeseries == 'true' | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-GPU | |
job-name: AutoGluon-Multimodal-Others | |
command: chmod +x ./.github/workflow_scripts/test_multimodal_others.sh && ./.github/workflow_scripts/test_multimodal_others.sh --run_single_gpu | |
test_multimodal_others_2: | |
needs: lint_check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check if changes beside docs | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
other_than_docs: | |
- '!(docs/**)**' | |
other_than_timeseries: | |
- '!(timeseries/**)**' | |
- name: Test Multimodal Others 2 on AWS Batch | |
if: steps.changes.outputs.other_than_docs == 'true' && steps.changes.outputs.other_than_timeseries == 'true' | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-GPU | |
job-name: AutoGluon-Multimodal-Others-2 | |
command: chmod +x ./.github/workflow_scripts/test_multimodal_others_2.sh && ./.github/workflow_scripts/test_multimodal_others_2.sh --run_single_gpu | |
test_timeseries: | |
needs: lint_check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check if changes beside docs | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
other_than_docs: | |
- '!(docs/**)**' | |
- name: Test Timeseries on AWS Batch | |
if: steps.changes.outputs.other_than_docs == 'true' | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-GPU | |
job-name: AutoGluon-Forecasting | |
command: chmod +x ./.github/workflow_scripts/test_timeseries.sh && ./.github/workflow_scripts/test_timeseries.sh | |
test_install: | |
needs: lint_check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check if changes beside docs | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
other_than_docs: | |
- '!(docs/**)**' | |
- name: Test Install on AWS Batch | |
if: steps.changes.outputs.other_than_docs == 'true' | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-CPU | |
job-name: AutoGluon-Install | |
command: chmod +x ./.github/workflow_scripts/test_install.sh && ./.github/workflow_scripts/test_install.sh | |
build_tabular_prediction_tutorial: | |
needs: [test_common, test_core, test_features, test_tabular, test_multimodal_predictor, test_multimodal_others, test_multimodal_others_2, test_timeseries, test_tabular_lite, test_install] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Env Vars | |
uses: ./.github/actions/setup-env-vars | |
- name: Build Tabular Prediction Tutorial on AWS Batch | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-GPU | |
job-name: AutoGluon-BuildTabularPrediction | |
command: chmod +x ./.github/workflow_scripts/build_tabular_prediction_tutorial.sh && ./.github/workflow_scripts/build_tabular_prediction_tutorial.sh '${{ env.BRANCH }}' '${{ env.GIT_REPO }}' '${{ env.SHORT_SHA }}' '${{ env.PR_NUMBER }}' | |
build_multimodal_tutorial: | |
strategy: | |
matrix: | |
SUB_DOC: ["advanced_topics", "image_prediction", "semantic_matching", "object_detection", "text_prediction", "document_prediction", "multimodal_prediction", "image_segmentation"] | |
needs: [test_common, test_core, test_features, test_tabular, test_multimodal_predictor, test_multimodal_others, test_multimodal_others_2, test_timeseries, test_install] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Env Vars | |
uses: ./.github/actions/setup-env-vars | |
- name: Build Multimodal Tutorial on AWS Batch | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-GPU | |
job-name: AutoGluon-BuildMultimodal | |
command: chmod +x ./.github/workflow_scripts/build_multimodal_tutorial.sh && ./.github/workflow_scripts/build_multimodal_tutorial.sh '${{ matrix.SUB_DOC }}' '${{ env.BRANCH }}' '${{ env.GIT_REPO }}' '${{ env.SHORT_SHA }}' '${{ env.PR_NUMBER }}' | |
build_cloud_fit_deploy_tutorial: | |
needs: [test_common, test_core, test_features, test_tabular, test_multimodal_predictor, test_multimodal_others, test_multimodal_others_2, test_timeseries, test_install] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Env Vars | |
uses: ./.github/actions/setup-env-vars | |
- name: Build Cloud Fit Deploy Tutorial on AWS Batch | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-CPU | |
job-name: AutoGluon-BuildCloudFitDeploy | |
command: chmod +x ./.github/workflow_scripts/build_cloud_fit_deploy_tutorial.sh && ./.github/workflow_scripts/build_cloud_fit_deploy_tutorial.sh '${{ env.BRANCH }}' '${{ env.GIT_REPO }}' '${{ env.SHORT_SHA }}' '${{ env.PR_NUMBER }}' | |
build_timeseries_tutorial: | |
needs: [test_common, test_core, test_features, test_tabular, test_multimodal_predictor, test_multimodal_others, test_multimodal_others_2, test_timeseries, test_install] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Env Vars | |
uses: ./.github/actions/setup-env-vars | |
- name: Build Timeseries Tutorial on AWS Batch | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-GPU | |
job-name: AutoGluon-BuildTimeseries | |
command: chmod +x ./.github/workflow_scripts/build_timeseries_tutorial.sh && ./.github/workflow_scripts/build_timeseries_tutorial.sh '${{ env.BRANCH }}' '${{ env.GIT_REPO }}' '${{ env.SHORT_SHA }}' '${{ env.PR_NUMBER }}' | |
# build_eda_tutorial: | |
# needs: [test_common, test_core, test_features, test_tabular, test_eda, test_multimodal_predictor, test_multimodal_others, test_multimodal_others_2, test_timeseries, test_install] | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v2 | |
# - name: Setup Env Vars | |
# uses: ./.github/actions/setup-env-vars | |
# - name: Build EDA Tutorial on AWS Batch | |
# uses: ./.github/actions/submit-job | |
# with: | |
# job-type: CI-GPU | |
# job-name: AutoGluon-BuildEda | |
# command: chmod +x ./.github/workflow_scripts/build_eda_tutorial.sh && ./.github/workflow_scripts/build_eda_tutorial.sh '${{ env.BRANCH }}' '${{ env.GIT_REPO }}' '${{ env.SHORT_SHA }}' '${{ env.PR_NUMBER }}' | |
build_all_docs: | |
needs: [build_tabular_prediction_tutorial, build_multimodal_tutorial, build_cloud_fit_deploy_tutorial, build_timeseries_tutorial] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Env Vars | |
uses: ./.github/actions/setup-env-vars | |
- name: Build All Docs on AWS Batch | |
uses: ./.github/actions/submit-job | |
with: | |
job-type: CI-GPU | |
job-name: AutoGluon-BuildAllDocs | |
command: chmod +x ./.github/workflow_scripts/build_all_docs.sh && ./.github/workflow_scripts/build_all_docs.sh '${{ env.BRANCH }}' '${{ env.GIT_REPO }}' '${{ env.SHORT_SHA }}' '${{ env.PR_NUMBER }}' | |
copy-docs: | |
needs: build_all_docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Env Vars | |
uses: ./.github/actions/setup-env-vars | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
role-to-assume: arn:aws:iam::369469875935:role/AutoGluonCiCopyDocs | |
role-duration-seconds: 3600 | |
aws-region: us-east-1 | |
- name: Copy Docs to Bucket(For push) | |
if: ${{ github.event_name == 'push' }} | |
run: | | |
chmod +x ./.github/workflow_scripts/copy_docs.sh | |
./.github/workflow_scripts/copy_docs.sh '${{ github.ref }}' '${{ github.repository }}' '${{ env.SHORT_SHA }}' | |
- name: Copy Docs to Bucket(For pull request) | |
if: ${{ github.event_name == 'pull_request_target' }} | |
env: | |
branch: ${{ github.event.pull_request.head.ref }} | |
run: | | |
chmod +x ./.github/workflow_scripts/copy_docs.sh | |
./.github/workflow_scripts/copy_docs.sh "$branch" '${{ github.event.pull_request.head.repo.full_name }}' '${{ env.SHORT_SHA }}' PR-'${{ github.event.number }}' | |
- name: Comment on PR | |
if: ${{ github.event_name == 'pull_request_target' }} | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
issue-number: ${{ github.event.number }} | |
body: | | |
Job PR-${{ github.event.number }}-${{ env.SHORT_SHA }} is done. | |
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-${{ github.event.number }}/${{ env.SHORT_SHA }}/index.html |