Skip to content

Commit

Permalink
fix the mistake of changing unwanted file
Browse files Browse the repository at this point in the history
Signed-off-by: hansinikarunarathne <107214435+hansinikarunarathne@users.noreply.github.com>
  • Loading branch information
hansinikarunarathne committed Jul 22, 2024
2 parents 8090fc3 + 2ab7778 commit 1a5c430
Show file tree
Hide file tree
Showing 32 changed files with 261 additions and 130 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/bash_formatter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Proper Formatting on bash files

on: [push, pull_request]

jobs:
format_bash_files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install ShellCheck
run: sudo apt install -y shellcheck

- name: Bash Formatting Guidelines
run: |
echo "### Bash Files Formatting Guidelines ###
If there are errors and warnings regarding your bash files,
You can check that error code definitions in https://www.shellcheck.net/wiki/ site.
You can correct them using the https://www.shellcheck.net/ site.
You have to ignore disable errors in .shellcheckrc file.
"
- name: Fetch master branch
run: git fetch origin master

- name: Set up changed files
run: |
git diff --name-only origin/master...HEAD | grep -E '^.*\.sh$' | grep -v '^apps/' > changed_files_in_PR.txt || true
- name: Display changed files
run: cat changed_files_in_PR.txt

- name: Run ShellCheck on changed files
run: |
cat changed_files_in_PR.txt | xargs -I {} shellcheck {}
shell: bash


32 changes: 32 additions & 0 deletions .github/workflows/python_formatter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Proper Formatting on Python files

on: [push, pull_request]

jobs:
format_python_files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Python Files Formatting Guidelines
run: |
echo "### Python Files Formatting Guidelines ###
If there is a formatting errors in your python files,
1. First install black
It requires Python 3.8+ to run.
Install with "pip install black" and if you use pipx, install Black with "pipx install black"
If you want to format Jupyter Notebooks, install with pip install "black[jupyter]"
2. Run the command
"python -m black {source_file_or_directory}" or
"black {source_file_or_directory}"
to format python files.
"
- uses: psf/black@stable
with:
src: |
./common
./example
59 changes: 59 additions & 0 deletions .github/workflows/yaml_formatter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Proper Formatting on YAML files

on: [push, pull_request]

jobs:
format_YAML_files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install yamllint
run: pip install yamllint

- name: YAML Formatting Guidelines
run: |
echo "### YAML Formatting Guidelines ###
If there is a formatting error in your YAML file, you will see errors like the one below:
'Error: 6:4 [indentation] wrong indentation: expected 2 but found 3'
To fix these errors, refer to the YAML formatting rules at:
https://yamllint.readthedocs.io/en/stable/rules.html#
Search for the keyword inside the brackets [] in the error message. In this example, it's 'indentation'.
Note: Some rules have been customized in the '.yamllint.yaml' file. Below is the content of that file:
extends: default
rules:
document-start:
present: false
document-end:
present: false
indentation:
indent-sequences: false
line-length:
max: 400
"
- name: Fetch master branch
run: git fetch origin master

- name: Set up changed files
run: |
git diff --name-only origin/master...HEAD | grep -E '^common/.*\.ya?ml$|^example/.*\.ya?ml$' > changed_files_in_PR.txt || true
- name: Display changed files
run: cat changed_files_in_PR.txt

- name: Run yamllint on changed files
run: |
chmod +x ./run_yamllint.sh
./run_yamllint.sh
shell: bash



2 changes: 1 addition & 1 deletion apps/admission-webhook/upstream/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ commonLabels:
images:
- name: docker.io/kubeflownotebookswg/poddefaults-webhook
newName: docker.io/kubeflownotebookswg/poddefaults-webhook
newTag: v1.9.0-rc.2
newTag: v1.9.0
namespace: kubeflow
generatorOptions:
disableNameSuffixHash: true
Expand Down
2 changes: 1 addition & 1 deletion apps/centraldashboard/upstream/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ resources:
images:
- name: docker.io/kubeflownotebookswg/centraldashboard
newName: docker.io/kubeflownotebookswg/centraldashboard
newTag: v1.9.0-rc.2
newTag: v1.9.0
configMapGenerator:
- envs:
- params.env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ commonLabels:
images:
- name: docker.io/kubeflownotebookswg/jupyter-web-app
newName: docker.io/kubeflownotebookswg/jupyter-web-app
newTag: v1.9.0-rc.2
newTag: v1.9.0
# We need the name to be unique without the suffix because the original name is what
# gets used with patches
configMapGenerator:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ resources:
images:
- name: docker.io/kubeflownotebookswg/notebook-controller
newName: docker.io/kubeflownotebookswg/notebook-controller
newTag: v1.9.0
newTag: v1.9.0
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ data:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/pytorch-mnist-cpu:v0.17.0-rc.1
image: docker.io/kubeflowkatib/pytorch-mnist-cpu:v0.17.0
command:
- "python3"
- "/opt/pytorch-mnist/mnist.py"
Expand All @@ -33,7 +33,7 @@ data:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/enas-cnn-cifar10-cpu:v0.17.0-rc.1
image: docker.io/kubeflowkatib/enas-cnn-cifar10-cpu:v0.17.0
command:
- python3
- -u
Expand All @@ -54,7 +54,7 @@ data:
spec:
containers:
- name: pytorch
image: docker.io/kubeflowkatib/pytorch-mnist-cpu:v0.17.0-rc.1
image: docker.io/kubeflowkatib/pytorch-mnist-cpu:v0.17.0
command:
- "python3"
- "/opt/pytorch-mnist/mnist.py"
Expand All @@ -68,7 +68,7 @@ data:
spec:
containers:
- name: pytorch
image: docker.io/kubeflowkatib/pytorch-mnist-cpu:v0.17.0-rc.1
image: docker.io/kubeflowkatib/pytorch-mnist-cpu:v0.17.0
command:
- "python3"
- "/opt/pytorch-mnist/mnist.py"
Expand Down
30 changes: 15 additions & 15 deletions apps/katib/upstream/installs/katib-cert-manager/katib-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,40 @@ init:
runtime:
metricsCollectors:
- kind: StdOut
image: docker.io/kubeflowkatib/file-metrics-collector:v0.17.0-rc.1
image: docker.io/kubeflowkatib/file-metrics-collector:v0.17.0
- kind: File
image: docker.io/kubeflowkatib/file-metrics-collector:v0.17.0-rc.1
image: docker.io/kubeflowkatib/file-metrics-collector:v0.17.0
- kind: TensorFlowEvent
image: docker.io/kubeflowkatib/tfevent-metrics-collector:v0.17.0-rc.1
image: docker.io/kubeflowkatib/tfevent-metrics-collector:v0.17.0
resources:
limits:
memory: 1Gi
suggestions:
- algorithmName: random
image: docker.io/kubeflowkatib/suggestion-hyperopt:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-hyperopt:v0.17.0
- algorithmName: tpe
image: docker.io/kubeflowkatib/suggestion-hyperopt:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-hyperopt:v0.17.0
- algorithmName: grid
image: docker.io/kubeflowkatib/suggestion-optuna:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-optuna:v0.17.0
- algorithmName: hyperband
image: docker.io/kubeflowkatib/suggestion-hyperband:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-hyperband:v0.17.0
- algorithmName: bayesianoptimization
image: docker.io/kubeflowkatib/suggestion-skopt:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-skopt:v0.17.0
- algorithmName: cmaes
image: docker.io/kubeflowkatib/suggestion-goptuna:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-goptuna:v0.17.0
- algorithmName: sobol
image: docker.io/kubeflowkatib/suggestion-goptuna:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-goptuna:v0.17.0
- algorithmName: multivariate-tpe
image: docker.io/kubeflowkatib/suggestion-optuna:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-optuna:v0.17.0
- algorithmName: enas
image: docker.io/kubeflowkatib/suggestion-enas:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-enas:v0.17.0
resources:
limits:
memory: 400Mi
- algorithmName: darts
image: docker.io/kubeflowkatib/suggestion-darts:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-darts:v0.17.0
- algorithmName: pbt
image: docker.io/kubeflowkatib/suggestion-pbt:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-pbt:v0.17.0
persistentVolumeClaimSpec:
accessModes:
- ReadWriteMany
Expand All @@ -56,4 +56,4 @@ runtime:
storage: 5Gi
earlyStoppings:
- algorithmName: medianstop
image: docker.io/kubeflowkatib/earlystopping-medianstop:v0.17.0-rc.1
image: docker.io/kubeflowkatib/earlystopping-medianstop:v0.17.0
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ resources:
images:
- name: docker.io/kubeflowkatib/katib-controller
newName: docker.io/kubeflowkatib/katib-controller
newTag: v0.17.0-rc.1
newTag: v0.17.0
- name: docker.io/kubeflowkatib/katib-db-manager
newName: docker.io/kubeflowkatib/katib-db-manager
newTag: v0.17.0-rc.1
newTag: v0.17.0
- name: docker.io/kubeflowkatib/katib-ui
newName: docker.io/kubeflowkatib/katib-ui
newTag: v0.17.0-rc.1
newTag: v0.17.0

patchesStrategicMerge:
- patches/katib-cert-injection.yaml
Expand Down
30 changes: 15 additions & 15 deletions apps/katib/upstream/installs/katib-external-db/katib-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,40 @@ init:
runtime:
metricsCollectors:
- kind: StdOut
image: docker.io/kubeflowkatib/file-metrics-collector:v0.17.0-rc.1
image: docker.io/kubeflowkatib/file-metrics-collector:v0.17.0
- kind: File
image: docker.io/kubeflowkatib/file-metrics-collector:v0.17.0-rc.1
image: docker.io/kubeflowkatib/file-metrics-collector:v0.17.0
- kind: TensorFlowEvent
image: docker.io/kubeflowkatib/tfevent-metrics-collector:v0.17.0-rc.1
image: docker.io/kubeflowkatib/tfevent-metrics-collector:v0.17.0
resources:
limits:
memory: 1Gi
suggestions:
- algorithmName: random
image: docker.io/kubeflowkatib/suggestion-hyperopt:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-hyperopt:v0.17.0
- algorithmName: tpe
image: docker.io/kubeflowkatib/suggestion-hyperopt:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-hyperopt:v0.17.0
- algorithmName: grid
image: docker.io/kubeflowkatib/suggestion-optuna:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-optuna:v0.17.0
- algorithmName: hyperband
image: docker.io/kubeflowkatib/suggestion-hyperband:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-hyperband:v0.17.0
- algorithmName: bayesianoptimization
image: docker.io/kubeflowkatib/suggestion-skopt:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-skopt:v0.17.0
- algorithmName: cmaes
image: docker.io/kubeflowkatib/suggestion-goptuna:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-goptuna:v0.17.0
- algorithmName: sobol
image: docker.io/kubeflowkatib/suggestion-goptuna:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-goptuna:v0.17.0
- algorithmName: multivariate-tpe
image: docker.io/kubeflowkatib/suggestion-optuna:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-optuna:v0.17.0
- algorithmName: enas
image: docker.io/kubeflowkatib/suggestion-enas:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-enas:v0.17.0
resources:
limits:
memory: 400Mi
- algorithmName: darts
image: docker.io/kubeflowkatib/suggestion-darts:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-darts:v0.17.0
- algorithmName: pbt
image: docker.io/kubeflowkatib/suggestion-pbt:v0.17.0-rc.1
image: docker.io/kubeflowkatib/suggestion-pbt:v0.17.0
persistentVolumeClaimSpec:
accessModes:
- ReadWriteMany
Expand All @@ -58,4 +58,4 @@ runtime:
storage: 5Gi
earlyStoppings:
- algorithmName: medianstop
image: docker.io/kubeflowkatib/earlystopping-medianstop:v0.17.0-rc.1
image: docker.io/kubeflowkatib/earlystopping-medianstop:v0.17.0
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ resources:
images:
- name: docker.io/kubeflowkatib/katib-controller
newName: docker.io/kubeflowkatib/katib-controller
newTag: v0.17.0-rc.1
newTag: v0.17.0
- name: docker.io/kubeflowkatib/katib-db-manager
newName: docker.io/kubeflowkatib/katib-db-manager
newTag: v0.17.0-rc.1
newTag: v0.17.0
- name: docker.io/kubeflowkatib/katib-ui
newName: docker.io/kubeflowkatib/katib-ui
newTag: v0.17.0-rc.1
newTag: v0.17.0
patchesStrategicMerge:
- patches/db-manager.yaml
# Modify katib-mysql-secrets with parameters for the DB.
Expand Down
Loading

0 comments on commit 1a5c430

Please sign in to comment.