Skip to content

Commit

Permalink
[Test] Reduce Katib GitHub Action Runs (#2036)
Browse files Browse the repository at this point in the history
* [Test] Reduce Katib GitHub Action Runs

* Add cancel-in-progress flag

* Use single job for Charmed Katib

* Add cancel-in-progress for all actions except publish

* Bump ubuntu to 20.04 for Charmed tests
  • Loading branch information
andreyvelich authored Nov 28, 2022
1 parent 831e1d3 commit b123dbf
Show file tree
Hide file tree
Showing 19 changed files with 137 additions and 158 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: E2E Test with darts-cnn-cifar10

on:
pull_request:
paths-ignore:
- 'pkg/new-ui/v1beta1/frontend/**'
- "pkg/new-ui/v1beta1/frontend/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -26,12 +31,10 @@ jobs:
experiments: ${{ matrix.experiments }}
# Comma Delimited
trial-images: darts-cnn-cifar10-cpu
database-type: ${{ matrix.database-type }}

strategy:
fail-fast: false
matrix:
kubernetes-version: ["v1.23.13", "v1.24.7", "v1.25.3"]
# Comma Delimited
experiments: ["darts-cpu"]
database-type: ["mysql", "postgres"]
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: E2E Test with enas-cnn-cifar10

on:
pull_request:
paths-ignore:
- 'pkg/new-ui/v1beta1/frontend/**'
- "pkg/new-ui/v1beta1/frontend/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -26,12 +31,10 @@ jobs:
experiments: ${{ matrix.experiments }}
# Comma Delimited
trial-images: enas-cnn-cifar10-cpu
database-type: ${{ matrix.database-type }}

strategy:
fail-fast: false
matrix:
kubernetes-version: ["v1.23.13", "v1.24.7", "v1.25.3"]
# Comma Delimited
experiments: ["enas-cpu"]
database-type: ["mysql", "postgres"]
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: E2E Test with mxnet-mnist

on:
pull_request:
paths-ignore:
- 'pkg/new-ui/v1beta1/frontend/**'
- "pkg/new-ui/v1beta1/frontend/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -26,7 +31,6 @@ jobs:
experiments: ${{ matrix.experiments }}
# Comma Delimited
trial-images: mxnet-mnist
database-type: ${{ matrix.database-type }}

strategy:
fail-fast: false
Expand All @@ -35,9 +39,6 @@ jobs:
# Comma Delimited
experiments:
# suggestion-hyperopt
- "random,tpe,never-resume"
- "median-stop,from-volume-resume"
- "never-resume,from-volume-resume,median-stop"
# others
- "grid,bayesian-optimization,tpe"
- "multivariate-tpe,cma-es,hyperband"
database-type: ["mysql", "postgres"]
- "grid,bayesian-optimization,tpe,multivariate-tpe,cma-es,hyperband"
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: E2E Test with pytorch-mnist

on:
pull_request:
paths-ignore:
- 'pkg/new-ui/v1beta1/frontend/**'
- "pkg/new-ui/v1beta1/frontend/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -27,7 +32,6 @@ jobs:
training-operator: true
# Comma Delimited
trial-images: pytorch-mnist-cpu
database-type: ${{ matrix.database-type }}

strategy:
fail-fast: false
Expand All @@ -37,4 +41,3 @@ jobs:
experiments:
- "file-metrics-collector,pytorchjob-mnist"
- "median-stop-with-json-format,file-metrics-collector-with-json-format"
database-type: ["mysql", "postgres"]
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: E2E Test with simple-pbt

on:
pull_request:
paths-ignore:
- 'pkg/new-ui/v1beta1/frontend/**'
- "pkg/new-ui/v1beta1/frontend/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -26,7 +31,6 @@ jobs:
experiments: ${{ matrix.experiments }}
# Comma Delimited
trial-images: simple-pbt
database-type: ${{ matrix.database-type }}

strategy:
fail-fast: false
Expand All @@ -35,4 +39,3 @@ jobs:
kubernetes-version: ["v1.23.13", "v1.24.7", "v1.25.3"]
# Comma Delimited
experiments: ["simple-pbt"]
database-type: ["mysql", "postgres"]
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: E2E Test with tf-mnist-with-summaries

on:
pull_request:
paths-ignore:
- 'pkg/new-ui/v1beta1/frontend/**'
- "pkg/new-ui/v1beta1/frontend/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -27,12 +32,10 @@ jobs:
training-operator: true
# Comma Delimited
trial-images: tf-mnist-with-summaries
database-type: ${{ matrix.database-type }}

strategy:
fail-fast: false
matrix:
kubernetes-version: ["v1.23.13", "v1.24.7", "v1.25.3"]
# Comma Delimited
experiments: ["tfjob-mnist-with-summaries"]
database-type: ["mysql", "postgres"]
38 changes: 38 additions & 0 deletions .github/workflows/e2e-test-ui-random-search-postgres.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: E2E Test with Katib UI, random search, and postgres

on:
- pull_request

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
e2e:
runs-on: ubuntu-20.04
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Test Env
uses: ./.github/workflows/template-setup-e2e-test
with:
kubernetes-version: ${{ matrix.kubernetes-version }}

- name: Run e2e test with ${{ matrix.experiments }} experiments
uses: ./.github/workflows/template-e2e-test
with:
experiments: random
# Comma Delimited
trial-images: mxnet-mnist
katib-ui: true
database-type: postgres

strategy:
fail-fast: false
matrix:
kubernetes-version: ["v1.23.13", "v1.24.7", "v1.25.3"]
30 changes: 0 additions & 30 deletions .github/workflows/katib-ui-e2e-test.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/lint.yaml

This file was deleted.

4 changes: 1 addition & 3 deletions .github/workflows/publish-algorithm-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ name: Publish AutoML Algorithm Images

on:
push:
paths-ignore:
- 'pkg/new-ui/v1beta1/frontend/**'
pull_request:
paths-ignore:
- 'pkg/new-ui/v1beta1/frontend/**'
- "pkg/new-ui/v1beta1/frontend/**"

jobs:
algorithm:
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/publish-core-images.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: Publish Katib Core Images

on:
push:
paths-ignore:
- 'pkg/new-ui/v1beta1/frontend/**'
pull_request:
paths-ignore:
- 'pkg/new-ui/v1beta1/frontend/**'
- push
- pull_request

jobs:
core:
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/publish-katib-ui-image.yaml

This file was deleted.

4 changes: 1 addition & 3 deletions .github/workflows/publish-trial-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ name: Publish Trial Images

on:
push:
paths-ignore:
- 'pkg/new-ui/v1beta1/frontend/**'
pull_request:
paths-ignore:
- 'pkg/new-ui/v1beta1/frontend/**'
- "pkg/new-ui/v1beta1/frontend/**"

jobs:
trial:
Expand Down
38 changes: 13 additions & 25 deletions .github/workflows/test-charmed-katib.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
name: Charmed Katib

on:
push:
paths-ignore:
- 'pkg/new-ui/v1beta1/frontend/**'
pull_request:
paths-ignore:
- 'pkg/new-ui/v1beta1/frontend/**'
- "pkg/new-ui/v1beta1/frontend/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
charmed:
name: Lint and Test
runs-on: ubuntu-20.04

steps:
- name: Check out code
Expand All @@ -21,38 +22,25 @@ jobs:
run: |
set -eux
sudo apt update
sudo apt install -y python3-pip
sudo apt install python3-setuptools
sudo pip3 install black flake8
sudo snap install juju --classic
sudo snap install juju-bundle --classic
sudo snap install juju-wait --classic
sudo pip3 install charmcraft==1.3.1
- name: Check black
run: black --check operators/*/src

- name: Check flake8
run: cd operators && flake8 ./katib*/src

build:
name: Test
runs-on: ubuntu-latest

steps:
- name: Check out repo
uses: actions/checkout@v3

- uses: balchua/microk8s-actions@v0.2.2
with:
channel: "1.21/stable"
addons: '["dns", "storage", "rbac"]'

- name: Install dependencies
run: |
set -eux
sudo apt update
sudo apt install -y python3-pip
sudo snap install juju --classic
sudo snap install juju-bundle --classic
sudo snap install juju-wait --classic
sudo pip3 install charmcraft==1.3.1
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@v2

Expand Down
Loading

0 comments on commit b123dbf

Please sign in to comment.