Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
e24ffaf
New intro_for_model_developers_EXECUTED.ipynb -secrets
validbeck Nov 14, 2024
8b28889
Test adding validmind[llm]
validbeck Nov 14, 2024
f49eb8d
Added variables locally
validbeck Nov 15, 2024
200ca8f
Adding dependencies
validbeck Nov 15, 2024
cfa5f33
Testing full page layout
validbeck Nov 15, 2024
5a17749
Latest from vm-library & missing libraries?
validbeck Nov 15, 2024
a5436c0
That didn't work, ugh
validbeck Nov 15, 2024
1b2b13b
I give up for today
validbeck Nov 15, 2024
0ec32e2
NVM reverting to a version that worked in theory
validbeck Nov 15, 2024
4dbccb3
Forgot comment
validbeck Nov 15, 2024
32f4bbd
Adding rendered notebook output to .gitignore
validbeck Nov 15, 2024
320ba95
SHAPGlobalImportance error workaround
validbeck Nov 15, 2024
bf61dab
updating shap version pls work
validbeck Nov 15, 2024
b7783ba
???
validbeck Nov 15, 2024
2aab185
?
validbeck Nov 15, 2024
66f79ad
.
validbeck Nov 15, 2024
2840923
..
validbeck Nov 15, 2024
bdb6ae7
Final touches to the workflows
validbeck Nov 15, 2024
98b445c
Updated .env.example
validbeck Nov 15, 2024
54e9175
Tweaking freeze settings
validbeck Nov 15, 2024
cb61d67
Spellingggg
validbeck Nov 15, 2024
ca1c931
Local execution instructions in front matter
validbeck Nov 15, 2024
746c288
Wow I forgot to add the changes
validbeck Nov 15, 2024
b4eadd9
Changing to ValidMind Academy model
validbeck Nov 15, 2024
39ef1d1
Edited comments in notebook front matter
validbeck Nov 16, 2024
5c92efa
Updated variables for mobile quirk
validbeck Nov 19, 2024
8caa893
Added _quarto-notebooks.yml
validbeck Nov 20, 2024
d4e6cfb
Updated model, removed global execution & reverted deploy-prod & stag…
validbeck Nov 20, 2024
2a24dc7
WIP moved notebook execution to its own workflow & removed front-matter
validbeck Nov 20, 2024
18130ef
Commenting out execution for now & added exe-demo profile
validbeck Nov 20, 2024
7288511
Added exe-staging & exe-prod
validbeck Nov 20, 2024
14fd461
New single-source action for handling Quarto for rendering
validbeck Nov 20, 2024
e5cce37
Testing single-sourcing Fetch Quarto on demo
validbeck Nov 21, 2024
a393f70
Single-sourced AWS credentials
validbeck Nov 21, 2024
ee6cb06
Whoops moving the checkout back into the main workflow
validbeck Nov 21, 2024
f6b613e
Adding shell to the action file?
validbeck Nov 21, 2024
e860850
Cleaned up aws action files
validbeck Nov 21, 2024
2d1fdad
Applied single-source to staging & prod workflows, testing AWS 1
validbeck Nov 21, 2024
6d2c547
Hmmmmm
validbeck Nov 21, 2024
8e23dd4
Trying one last time
validbeck Nov 21, 2024
bb75510
I give up, reverting to the old version
validbeck Nov 21, 2024
205b22b
Test — if condition for site/notebook/ changes
validbeck Nov 21, 2024
79de199
Test — if condition for site/notebook/ changes in an action
validbeck Nov 21, 2024
29d510a
Hide navbar 4 executed notebook & clear quarto cache b4 execution
validbeck Nov 21, 2024
67865b8
Testing a change to the executed notebook
validbeck Nov 21, 2024
cfab932
Trying again
validbeck Nov 21, 2024
4e4ba91
Swapping where the secret lives
validbeck Nov 21, 2024
cece1aa
Applying same changes to staging & prod workflows/actions
validbeck Nov 21, 2024
9d3283b
Removing clean command orz
validbeck Nov 21, 2024
c6949a7
No changes to site/notebooks
validbeck Nov 21, 2024
68a91f1
Latest from vm-library
validbeck Nov 22, 2024
afb8f81
Oops forgot to pull from main first
validbeck Nov 22, 2024
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
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
OPENAI_API_KEY=ADD_YOUR_KEY_HERE
OPENAI_API_KEY=ADD_YOUR_KEY_HERE

# API INFO TO RUN /notebooks/tutorials/intro_for_model_developers_EXECUTED.ipynb
PLATFORM_API_KEY=ADD_YOUR_API_KEY_HERE
PLATFORM_API_SECRET=ADD_YOUR_API_SECRET_HERE
37 changes: 37 additions & 0 deletions .github/actions/demo-notebook/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Execute demo notebook
description: Installs python3, validmind, checks dependencies then executes ONLY the Intro for Model Developers notebook with development heap tracking

inputs: {}

runs:
using: "composite"
steps:
- name: Install python3 for Jupyter Notebooks
shell: bash
run: |
python3 -m pip install jupyter
python -m pip install --upgrade pip

- name: Install validmind for notebook execution
shell: bash
run: |
pip install validmind
pip install validmind[llm]
pip install fairlearn aequitas
pip install shap==0.44.1

- name: Check dependencies
shell: bash
run: |
pip install pycairo
pip check

- name: Execute ONLY the Intro for Model Developers notebook with heap development
shell: bash
run: |
cd site
quarto render --profile exe-demo notebooks/tutorials/intro_for_model_developers_EXECUTED.ipynb &> render_errors.log || {
echo "Execute for intro_for_model_developers_EXECUTED.ipynb failed";
cat render_errors.log;
exit 1;
}
21 changes: 21 additions & 0 deletions .github/actions/fetch-quarto/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Fetch Quarto
description: Checks out repo then downloads & installs the latest version of Quarto

inputs: {}

runs:
using: "composite"
steps:
- name: Get latest Quarto release URL
id: get-quarto-url
shell: bash
run: |
API_URL="https://api.github.com/repos/quarto-dev/quarto-cli/releases/latest"
DOWNLOAD_URL=$(curl -s $API_URL | jq -r '.assets[] | select(.name | endswith("linux-amd64.deb")).browser_download_url')
echo "DOWNLOAD_URL=$DOWNLOAD_URL" >> $GITHUB_ENV

- name: Download and install Quarto
shell: bash
run: |
wget ${{ env.DOWNLOAD_URL }} -O quarto-latest-linux-amd64.deb
sudo dpkg -i quarto-latest-linux-amd64.deb
37 changes: 37 additions & 0 deletions .github/actions/prod-notebook/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Execute prod notebook
description: Installs python3, validmind, checks dependencies then executes ONLY the Intro for Model Developers notebook with production heap tracking

inputs: {}

runs:
using: "composite"
steps:
- name: Install python3 for Jupyter Notebooks
shell: bash
run: |
python3 -m pip install jupyter
python -m pip install --upgrade pip

- name: Install validmind for notebook execution
shell: bash
run: |
pip install validmind
pip install validmind[llm]
pip install fairlearn aequitas
pip install shap==0.44.1

- name: Check dependencies
shell: bash
run: |
pip install pycairo
pip check

- name: Execute ONLY the Intro for Model Developers notebook with heap production
shell: bash
run: |
cd site
quarto render --profile exe-prod notebooks/tutorials/intro_for_model_developers_EXECUTED.ipynb &> render_errors.log || {
echo "Execute for intro_for_model_developers_EXECUTED.ipynb failed";
cat render_errors.log;
exit 1;
}
37 changes: 37 additions & 0 deletions .github/actions/staging-notebook/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Execute staging notebook
description: Installs python3, validmind, checks dependencies then executes ONLY the Intro for Model Developers notebook with staging heap tracking

inputs: {}

runs:
using: "composite"
steps:
- name: Install python3 for Jupyter Notebooks
shell: bash
run: |
python3 -m pip install jupyter
python -m pip install --upgrade pip

- name: Install validmind for notebook execution
shell: bash
run: |
pip install validmind
pip install validmind[llm]
pip install fairlearn aequitas
pip install shap==0.44.1

- name: Check dependencies
shell: bash
run: |
pip install pycairo
pip check

- name: Execute ONLY the Intro for Model Developers notebook with heap staging
shell: bash
run: |
cd site
quarto render --profile exe-staging notebooks/tutorials/intro_for_model_developers_EXECUTED.ipynb &> render_errors.log || {
echo "Execute for intro_for_model_developers_EXECUTED.ipynb failed";
cat render_errors.log;
exit 1;
}
35 changes: 22 additions & 13 deletions .github/workflows/deploy-docs-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,10 @@ jobs:
- name: Check out repository
uses: actions/checkout@v2

- name: Get latest Quarto release URL
id: get-quarto-url
run: |
API_URL="https://api.github.com/repos/quarto-dev/quarto-cli/releases/latest"
DOWNLOAD_URL=$(curl -s $API_URL | jq -r '.assets[] | select(.name | endswith("linux-amd64.deb")).browser_download_url')
echo "DOWNLOAD_URL=$DOWNLOAD_URL" >> $GITHUB_ENV

- name: Download and install Quarto
run: |
wget ${{ env.DOWNLOAD_URL }} -O quarto-latest-linux-amd64.deb
sudo dpkg -i quarto-latest-linux-amd64.deb
- name: Fetch Quarto
uses: ./.github/actions/fetch-quarto

- name: Render docs site
- name: Render prod docs site
run: |
cd site
quarto render --profile production &> render_errors.log || {
Expand All @@ -39,9 +30,27 @@ jobs:
exit 1;
}

# See if site/notebooks/ has updates
- name: Filter changed files
uses: dorny/paths-filter@v2
id: filter
with:
filters: |
notebooks:
- 'site/notebooks/**'

# If yes then execute the prod notebook
- name: Execute prod Intro for Model Developers notebook
if: steps.filter.outputs.notebooks == 'true'
uses: ./.github/actions/prod-notebook
id: execute-prod-notebook
env:
PLATFORM_API_KEY: ${{ secrets.PLATFORM_API_KEY }}
PLATFORM_API_SECRET: ${{ secrets.PLATFORM_API_SECRET }}

# Prod bucket is in us-east-1
- name: Configure AWS credentials
run: aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} && aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} && aws configure set default.region us-east-1

- name: Deploy docs site
- name: Deploy docs prod site
run: aws s3 sync site/_site s3://docs-ci-cd-prod/site --delete && aws cloudfront create-invalidation --distribution-id E2I9R40IH01NW3 --paths "/*" --no-cli-pager
35 changes: 22 additions & 13 deletions .github/workflows/deploy-docs-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,10 @@ jobs:
- name: Check out repository
uses: actions/checkout@v2

- name: Get latest Quarto release URL
id: get-quarto-url
run: |
API_URL="https://api.github.com/repos/quarto-dev/quarto-cli/releases/latest"
DOWNLOAD_URL=$(curl -s $API_URL | jq -r '.assets[] | select(.name | endswith("linux-amd64.deb")).browser_download_url')
echo "DOWNLOAD_URL=$DOWNLOAD_URL" >> $GITHUB_ENV

- name: Download and install Quarto
run: |
wget ${{ env.DOWNLOAD_URL }} -O quarto-latest-linux-amd64.deb
sudo dpkg -i quarto-latest-linux-amd64.deb
- name: Fetch Quarto
uses: ./.github/actions/fetch-quarto

- name: Render docs site
- name: Render staging docs site
run: |
cd site
quarto render --profile staging &> render_errors.log || {
Expand All @@ -39,9 +30,27 @@ jobs:
exit 1;
}

# See if site/notebooks/ has updates
- name: Filter changed files
uses: dorny/paths-filter@v2
id: filter
with:
filters: |
notebooks:
- 'site/notebooks/**'

# If yes then execute the staging notebook
- name: Execute staging Intro for Model Developers notebook
if: steps.filter.outputs.notebooks == 'true'
uses: ./.github/actions/staging-notebook
id: execute-staging-notebook
env:
PLATFORM_API_KEY: ${{ secrets.PLATFORM_API_KEY }}
PLATFORM_API_SECRET: ${{ secrets.PLATFORM_API_SECRET }}

# Staging bucket is in us-west-2
- name: Configure AWS credentials
run: aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID_STAGING }} && aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY_STAGING }} && aws configure set default.region us-west-2

- name: Deploy docs site
- name: Deploy docs staging site
run: aws s3 sync site/_site s3://docs-ci-cd-staging/site --delete && aws cloudfront create-invalidation --distribution-id E2FB73KGY63MV6 --paths "/*" --no-cli-pager
35 changes: 22 additions & 13 deletions .github/workflows/validate-docs-site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,35 @@ jobs:
- name: Check out repository
uses: actions/checkout@v2

- name: Get latest Quarto release URL
id: get-quarto-url
run: |
API_URL="https://api.github.com/repos/quarto-dev/quarto-cli/releases/latest"
DOWNLOAD_URL=$(curl -s $API_URL | jq -r '.assets[] | select(.name | endswith("linux-amd64.deb")).browser_download_url')
echo "DOWNLOAD_URL=$DOWNLOAD_URL" >> $GITHUB_ENV

- name: Download and install Quarto
run: |
wget ${{ env.DOWNLOAD_URL }} -O quarto-latest-linux-amd64.deb
sudo dpkg -i quarto-latest-linux-amd64.deb
- name: Fetch Quarto
uses: ./.github/actions/fetch-quarto

- name: Render site
- name: Render demo docs site
run: |
cd site
quarto render --profile development &> render_errors.log || {
echo "Quarto render failed immediately";
cat render_errors.log;
exit 1;
}

# See if site/notebooks/ has updates
- name: Filter changed files
uses: dorny/paths-filter@v2
id: filter
with:
filters: |
notebooks:
- 'site/notebooks/**'

# If yes then execute the demo notebook
- name: Execute demo Intro for Model Developers notebook
if: steps.filter.outputs.notebooks == 'true'
uses: ./.github/actions/demo-notebook
id: execute-demo-notebook
env:
PLATFORM_API_KEY: ${{ secrets.PLATFORM_API_KEY }}
PLATFORM_API_SECRET: ${{ secrets.PLATFORM_API_SECRET }}

- name: Test for warnings or errors
run: |
Expand All @@ -48,7 +57,7 @@ jobs:
echo "No warnings or errors detected during Quarto render"
fi

# Demo bucket is in us-east-1
# Demo bucket is in us-east-1
- name: Configure AWS credentials
run: aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} && aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} && aws configure set default.region us-east-1

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ site/.quarto/
site/.gitignore

# Rendered docs site
site/_site/
site/_site/
site/_freeze/
site/notebooks/tutorials/my_tests/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ After you pull in the changes, commit them to this repo as part of the release n

<!-- September 16, 2024: Need to mention rendered Python `.html` docs and generated `.md` test descriptions -->

<!-- Testing simplified merge strategy -->
<!-- Testing conditional changes on site/notebooks/ -->
12 changes: 12 additions & 0 deletions site/_quarto-exe-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
format:
Comment thread
validbeck marked this conversation as resolved.
html:
page-layout: full
navbar: false
code-tools: true
include-in-header:
- environments/heap-development.html
include-after-body:
- https://unpkg.com/@jupyter-widgets/html-manager@*/dist/embed-amd.js
execute:
enabled: true
freeze: auto
12 changes: 12 additions & 0 deletions site/_quarto-exe-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
format:
html:
page-layout: full
navbar: false
code-tools: true
include-in-header:
- environments/heap-production.html
include-after-body:
- https://unpkg.com/@jupyter-widgets/html-manager@*/dist/embed-amd.js
execute:
enabled: true
freeze: auto
12 changes: 12 additions & 0 deletions site/_quarto-exe-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
format:
html:
page-layout: full
navbar: false
code-tools: true
include-in-header:
- environments/heap-staging.html
include-after-body:
- https://unpkg.com/@jupyter-widgets/html-manager@*/dist/embed-amd.js
execute:
enabled: true
freeze: auto
Loading