Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 19 additions & 19 deletions .github/workflows/bert-models-cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,36 +57,36 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v7
- name: List all modified files
run: |
for file in "${{ steps.changed-files.outputs.all_modified_files }}"; do
echo "$file was modified"
done
- name: Run step when a file changes
if: contains(steps.changed-files.outputs.all_modified_files, env.DOCKERFILE)
run: |
echo "Your file ${{ env.DOCKERFILE }} has been modified."
# - name: Get changed files
# id: changed-files
# uses: tj-actions/changed-files@v7
# - name: List all modified files
# run: |
# for file in "${{ steps.changed-files.outputs.all_modified_files }}"; do
# echo "$file was modified"
# done
# - name: Run step when a file changes
# if: contains(steps.changed-files.outputs.all_modified_files, env.DOCKERFILE)
# run: |
# echo "Your file ${{ env.DOCKERFILE }} has been modified."
- name: Set up Cloud SDK
if: contains(steps.changed-files.outputs.all_modified_files, env.DOCKERFILE)
# if: contains(steps.changed-files.outputs.all_modified_files, env.DOCKERFILE)
uses: google-github-actions/setup-gcloud@master
with:
project_id: ${{ secrets.GCE_PROJECT }}
service_account_key: ${{ secrets.GCE_SA_KEY }}
version: '290.0.1'
- name: Configure Docker Authentication
if: contains(steps.changed-files.outputs.all_modified_files, env.DOCKERFILE)
# if: contains(steps.changed-files.outputs.all_modified_files, env.DOCKERFILE)
run: gcloud --quiet auth configure-docker
- name: Set MODEL_VERSION env
if: contains(steps.changed-files.outputs.all_modified_files, env.DOCKERFILE)
# if: contains(steps.changed-files.outputs.all_modified_files, env.DOCKERFILE)
run: echo "MODEL_VERSION=$(grep 'BASE' MODEL_VERSIONS | cut -f 2 -d '=')" >> $GITHUB_ENV
- name: Build Docker Image
if: contains(steps.changed-files.outputs.all_modified_files, env.DOCKERFILE)
# if: contains(steps.changed-files.outputs.all_modified_files, env.DOCKERFILE)
run: docker build --tag "gcr.io/$PROJECT_ID/$IMAGE_NAME:$MODEL_VERSION" -f ${{ env.DOCKERFILE }} .
- name: Publish Docker Image to Google Container Registry
if: contains(steps.changed-files.outputs.all_modified_files, env.DOCKERFILE)
# if: contains(steps.changed-files.outputs.all_modified_files, env.DOCKERFILE)
run: docker push "gcr.io/$PROJECT_ID/$IMAGE_NAME:$MODEL_VERSION"

# ----------------------------------------------------------------------------------- #
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
contains(steps.changed-files.outputs.all_modified_files, env.ENTRYPOINT_FILE)
run: |
sh -c ".github/workflows/monitor-ai-platform-job.sh ${{ env.AI_PLATFORM_JOB_NAME }}"
timeout-minutes: 180
timeout-minutes: 1800

# -------------------------------------------------------------------------------------- #
# BUILD/PUSH BL_CHEMICAL_TO_DISEASE_OR_PHENOTYPIC_FEATURE CLASSIFICATION CONTAINER IMAGE #
Expand All @@ -234,7 +234,7 @@ jobs:
ENTRYPOINT_FILE: scripts/predict.entrypoint.sh
BASE_DOCKERFILE: base.Dockerfile
MODEL_VERSION_KEY: BL_CHEMICAL_TO_DISEASE_OR_PHENOTYPIC_FEATURE
CLASSIFICATION_LABELS: "treats false"
CLASSIFICATION_LABELS: "treats contributes_to false"
DATA_FILE: data/bl_chemical_to_disease_or_phenotypic_feature/data.tsv
steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
code/
.DS_Store
cloudbuild*.yaml
test.Dockerfile
Expand Down
4 changes: 2 additions & 2 deletions MODEL_VERSIONS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BASE=0.1
BL_CHEMICAL_TO_DISEASE_OR_PHENOTYPIC_FEATURE=0.1
BASE=0.3
BL_CHEMICAL_TO_DISEASE_OR_PHENOTYPIC_FEATURE=0.3
BL_CHEMICAL_TO_GENE=0.1
BL_DISEASE_TO_PHENOTYPIC_FEATURE=0.1
BL_GENE_REGULATORY_RELATIONSHIP=0.1
Expand Down
Loading