Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into launch-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-water committed Apr 3, 2024
2 parents c0a95f2 + a459822 commit 9c69e05
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/wandb_create_and_build_job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Create W&B Job (+ cloud build)"

on:
push:
tags:
- 'builds/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo content
uses: actions/checkout@v4 # checkout the repository content to github runner.
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.10.14 #install the python needed
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wandb
- name: "Login to W&B"
run: |
wandb login ${{ secrets.WANDB_API_KEY }}
- name: "Login to GCP" # at this point we could deploy with wandb job create code, which would deploy with this version, however it then wouldn't link back to the Github branch on W&B which is really handy.##git config credential.helper '!f() { echo username=dead-water; echo "password=${{ secrets.PAT_GITHUB_READONLY_THIS_REPO }}"; };f'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.GCP_CRED }}
- name: "Create W&B job"
run: |
cd ..
ls -hal
tar -cvzf repo.tgz SDO-FM
gcloud builds submit repo.tgz --tag ${{ secrets.GCP_ARTIFACT_REG }}/sdofm:${{ github.ref_name }}
wandb job create --project "${{ secrets.WANDB_PROJECT }}" --entity "${{ secrets.WANDB_ORG }}" --name "gha-${{ github.ref_name }}" --entry-point "scripts/test.py" image ${{ secrets.GCP_ARTIFACT_REG }}/sdofm:${{ github.ref_name }}
28 changes: 28 additions & 0 deletions .github/workflows/wandb_create_job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Create W&B Job (w/o cloud build)"

on:
push:
branches:
- main
tags:
- 'jobs/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo content
uses: actions/checkout@v2 # checkout the repository content to github runner.
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.10.14 #install the python needed
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black
pip install wandb
wandb login ${{ secrets.WANDB_API_KEY }}
- name: Create WANDB job # at this point we could deploy with wandb job create code, which would deploy with this version, however it then wouldn't link back to the Github branch on W&B which is really handy.##git config credential.helper '!f() { echo username=dead-water; echo "password=${{ secrets.PAT_GITHUB_READONLY_THIS_REPO }}"; };f'
run: |
wandb job create --project "${{ secrets.WANDB_PROJECT }}" --entity "${{ secrets.WANDB_ORG }}" --name "gha-${{ github.ref_name }}" git https://oauth2:${{ secrets.PAT_GITHUB_READONLY_THIS_REPO }}@github.com/spaceml-org/SDO-FM.git -g launch-testing --entry-point "scripts/test.py"

0 comments on commit 9c69e05

Please sign in to comment.