Skip to content

Commit b2ef4a4

Browse files
authored
Merge branch 'main' into dev/ba/add-checkpointing-documentation
2 parents ebeec22 + a29272f commit b2ef4a4

236 files changed

Lines changed: 47300 additions & 8566 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "BioNeMo2 Development Container",
2+
"name": "BioNeMo2 Framework Dev Container",
33
"runArgs": [
44
"--gpus=all",
55
"--shm-size=4g"
@@ -23,8 +23,8 @@
2323
"TMPDIR": "/tmp",
2424
"NUMBA_CACHE_DIR": "/tmp/"
2525
},
26-
"postCreateCommand": "./.devcontainer/postCreateCommand.sh",
27-
"initializeCommand": "./.devcontainer/initializeCommand.sh",
26+
"postCreateCommand": "./.devcontainer/framework/postCreateCommand.sh",
27+
"initializeCommand": "./.devcontainer/framework/initializeCommand.sh",
2828
"remoteUser": "ubuntu",
2929
"customizations": {
3030
"vscode": {
@@ -55,8 +55,7 @@
5555
"python.defaultInterpreterPath": "/usr/bin/python",
5656
"python.testing.pytestEnabled": true,
5757
"python.testing.pytestArgs": [
58-
"sub-packages/",
59-
"scripts/"
58+
"sub-packages/"
6059
],
6160
"python.analysis.typeCheckingMode": "standard"
6261
}
File renamed without changes.
File renamed without changes.

.devcontainer/recipes/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM nvcr.io/nvidia/pytorch:25.06-py3
2+
RUN --mount=type=cache,target=/root/.cache/pip \
3+
--mount=type=bind,source=requirements.txt,target=/workspace/requirements.txt \
4+
PIP_CONSTRAINT= pip install -r /workspace/requirements.txt

.devcontainer/recipes/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Dev Container Setup
2+
3+
General-purpose dev container for local recipe development.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
3+
{
4+
"name": "BioNeMo Recipes Dev Container",
5+
"build": {
6+
"dockerfile": "Dockerfile"
7+
},
8+
"mounts": [
9+
"source=${localEnv:HOME}/.cache,target=/home/ubuntu/.cache,type=bind,consistency=cached",
10+
"source=${localEnv:HOME}/.netrc,target=/home/ubuntu/.netrc,type=bind,consistency=cached",
11+
"source=${localEnv:HOME}/.bash_history_devcontainer,target=/home/ubuntu/.bash_history,type=bind,consistency=cached"
12+
],
13+
"postCreateCommand": ".devcontainer/recipes/postCreateCommand.sh",
14+
"remoteUser": "ubuntu",
15+
"runArgs": [
16+
"--gpus=all",
17+
"--shm-size=4g"
18+
],
19+
"customizations": {
20+
"vscode": {
21+
"extensions": [
22+
"ms-python.python",
23+
"charliermarsh.ruff",
24+
"redhat.vscode-yaml",
25+
"ms-toolsai.jupyter",
26+
"eamodio.gitlens",
27+
"tamasfe.even-better-toml",
28+
"streetsidesoftware.code-spell-checker"
29+
]
30+
}
31+
}
32+
}

.devcontainer/recipes/postCreateCommand.sh

Whitespace-only changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
accelerate
2+
datasets
3+
deepspeed
4+
hydra-core
5+
torch
6+
megatron-fsdp==0.1.0rc0
7+
torchmetrics
8+
tqdm
9+
transformer_engine
10+
transformers @ git+https://github.com/huggingface/transformers.git
11+
typer
12+
wandb

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Configure CI behavior by applying the relevant labels:
2020
- [INCLUDE_NOTEBOOKS_TESTS](https://github.com/NVIDIA/bionemo-framework/blob/main/docs/docs/user-guide/contributing/contributing.md#include_notebooks_tests) - Execute notebook validation tests in pytest
2121
- [INCLUDE_SLOW_TESTS](https://github.com/NVIDIA/bionemo-framework/blob/main/docs/docs/user-guide/contributing/contributing.md#include_slow_tests) - Execute tests labelled as slow in pytest for extensive testing
2222

23-
> \[!NOTE\]
23+
> [!NOTE]
2424
> By default, the notebooks validation tests are skipped unless explicitly enabled.
2525
2626
#### Authorizing CI Runs

.github/workflows/unit-tests.yml renamed to .github/workflows/unit-tests-framework.yml

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "BioNemo Image Build and Unit Tests"
1+
name: "BioNeMo Framework CI"
22

33
on:
44
push:
@@ -20,18 +20,54 @@ concurrency:
2020
cancel-in-progress: true
2121

2222
jobs:
23-
pre-commit:
23+
changed-files:
2424
runs-on: ubuntu-latest
25+
outputs:
26+
any_changed: ${{ steps.changed-files.outputs.any_changed }}
2527
steps:
2628
- uses: actions/checkout@v4
2729
with:
2830
fetch-depth: 0
2931
submodules: "recursive"
32+
33+
- uses: step-security/changed-files@v46
34+
id: changed-files
35+
with:
36+
base_sha: main
37+
files: |
38+
**
39+
!models/**
40+
!recipes/**
41+
!**.md
42+
!.github/**
43+
!.gitignore
44+
!.devcontainer/**
45+
.github/workflows/unit-tests-framework.yml
46+
47+
- name: Show output
48+
run: |
49+
echo '${{ toJSON(steps.changed-files.outputs) }}'
50+
shell:
51+
bash
52+
53+
54+
pre-commit:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
with:
59+
fetch-depth: 0
3060
- uses: actions/setup-python@v5
3161
with:
32-
python-version: "3.12"
33-
cache: "pip"
34-
- run: pip install -r requirements-dev.txt
62+
python-version: "3.13"
63+
- name: Setup UV
64+
uses: astral-sh/setup-uv@v6
65+
with:
66+
enable-cache: true
67+
- run: |
68+
uv tool install pre-commit --with pre-commit-uv --force-reinstall
69+
uv tool install tach>=0.9.0
70+
uv tool update-shell
3571
- run: ./ci/scripts/static_checks.sh
3672

3773
# With copy-pr-bot, we need to get the PR labels from the PR API rather than from the event metadata.
@@ -65,8 +101,10 @@ jobs:
65101
needs:
66102
- pre-commit
67103
- get-pr-labels
104+
- changed-files
68105
runs-on: linux-amd64-cpu16
69-
if: ${{ !contains(fromJSON(needs.get-pr-labels.outputs.labels || '[]'), 'SKIP_CI') }}
106+
# We want this to run on schedule events even if no files have changed
107+
if: ${{ github.event_name == 'schedule' || (!contains(fromJSON(needs.get-pr-labels.outputs.labels || '[]'), 'SKIP_CI') && needs.changed-files.outputs.any_changed == 'true') }}
70108
steps:
71109
- name: Login to Docker Hub
72110
uses: docker/login-action@v3
@@ -77,7 +115,7 @@ jobs:
77115
- name: Checkout repository
78116
uses: actions/checkout@v4
79117
with:
80-
submodules: "recursive"
118+
submodules: true
81119

82120
- name: Set up Docker Buildx
83121
uses: docker/setup-buildx-action@v3

0 commit comments

Comments
 (0)