Skip to content

Commit 03ef6e6

Browse files
committed
Merge remote-tracking branch 'origin' into br_bnm2533_fix_evo2_tests_a
2 parents 9537a47 + b6bd5ed commit 03ef6e6

134 files changed

Lines changed: 8506 additions & 5329 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.

.github/pull_request_template.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
### Description
2+
23
<!-- Provide a detailed description of the changes in this PR -->
34

45
### Type of changes
6+
57
<!-- Mark the relevant option with an [x] -->
68

7-
- [ ] Bug fix (non-breaking change which fixes an issue)
8-
- [ ] New feature (non-breaking change which adds functionality)
9-
- [ ] Refactor
10-
- [ ] Documentation update
11-
- [ ] Other (please describe):
9+
- [ ] Bug fix (non-breaking change which fixes an issue)
10+
- [ ] New feature (non-breaking change which adds functionality)
11+
- [ ] Refactor
12+
- [ ] Documentation update
13+
- [ ] Other (please describe):
1214

1315
### CI Pipeline Configuration
16+
1417
Configure CI behavior by applying the relevant labels:
1518

1619
- [SKIP_CI](https://github.com/NVIDIA/bionemo-framework/blob/main/docs/docs/user-guide/contributing/contributing.md#skip_ci) - Skip all continuous integration tests
@@ -25,21 +28,24 @@ Configure CI behavior by applying the relevant labels:
2528
We use [copy-pr-bot](https://docs.gha-runners.nvidia.com/apps/copy-pr-bot/#automation) to manage authorization of CI
2629
runs on NVIDIA's compute resources.
2730

28-
* If a pull request is opened by a trusted user and contains only trusted changes, the pull request's code will
31+
- If a pull request is opened by a trusted user and contains only trusted changes, the pull request's code will
2932
automatically be copied to a pull-request/ prefixed branch in the source repository (e.g. pull-request/123)
30-
* If a pull request is opened by an untrusted user or contains untrusted changes, an NVIDIA org member must leave an
33+
- If a pull request is opened by an untrusted user or contains untrusted changes, an NVIDIA org member must leave an
3134
`/ok to test` comment on the pull request to trigger CI. This will need to be done for each new commit.
3235

3336
### Usage
37+
3438
<!--- How does a user interact with the changed code -->
39+
3540
```python
36-
TODO: Add code snippet
41+
# TODO: Add code snippet
3742
```
3843

3944
### Pre-submit Checklist
45+
4046
<!--- Ensure all items are completed before submitting -->
4147

42-
- [ ] I have tested these changes locally
43-
- [ ] I have updated the documentation accordingly
44-
- [ ] I have added/updated tests as needed
45-
- [ ] All existing tests pass successfully
48+
- [ ] I have tested these changes locally
49+
- [ ] I have updated the documentation accordingly
50+
- [ ] I have added/updated tests as needed
51+
- [ ] All existing tests pass successfully

.github/workflows/internal_tools.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
submodules: "recursive"
3030
- uses: actions/setup-python@v5
3131
with:
32-
python-version: "3.12"
32+
python-version: "3.13"
3333
cache: "pip"
3434
- run: pip install -r requirements-dev.txt
3535
- run: ./ci/scripts/static_checks.sh

.mdformat.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
number = true # options: {false, true}
2+
exclude = [
3+
"docs/docs/index.md", # Exclude highly formatted index page
4+
]

.pre-commit-config.yaml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
repos:
2+
- repo: local
3+
hooks:
4+
- id: license-header-check
5+
name: Run license-check script
6+
entry: ./ci/scripts/license_check.py
7+
language: python
8+
types_or: [python, rust]
9+
pass_filenames: true
10+
always_run: false
211
- repo: https://github.com/pre-commit/pre-commit-hooks
312
rev: v2.3.0
413
hooks:
@@ -7,12 +16,22 @@ repos:
716
- id: check-yaml
817
exclude: "mkdocs.yml"
918
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.9.10
19+
rev: v0.12.8
1120
hooks:
1221
- id: ruff
1322
# 1. Attempt to automatically fix any lint issues.
1423
args: ["--fix"]
1524
- id: ruff-format
25+
- repo: https://github.com/executablebooks/mdformat
26+
rev: 0.7.22 # Use the latest stable version
27+
hooks:
28+
- id: mdformat
29+
language_version: python3.13
30+
additional_dependencies:
31+
- mdformat-tables
32+
- mdformat-gfm
33+
- mdformat-black
34+
- mdformat-frontmatter
1635
- repo: https://github.com/Yelp/detect-secrets
1736
rev: v1.5.0
1837
hooks:
@@ -23,12 +42,3 @@ repos:
2342
- id: detect-secrets
2443
name: detect-secrets (notebooks only)
2544
args: ['--baseline', '.secrets-nb.baseline', '--exclude-files', '^.(?!.*\.ipynb)', '--exclude-lines', '"(hash|id|image/\w+)":.*|<.*at 0x[0-9a-f]+>|object at 0x[0-9a-f]+', ]
26-
- repo: local
27-
hooks:
28-
- id: license-header-check
29-
name: Run license-check script
30-
entry: python internal/infra-bionemo/src/infra_bionemo/license_check.py -c scripts -c sub-packages -c docs -c internal --license-header ./license_header --modify
31-
language: python
32-
additional_dependencies: ["click==8.1.7"]
33-
pass_filenames: false
34-
always_run: true

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ EOF
6464
## Drop this when pytorch images ship the fixed commit.
6565
ARG TE_TAG=9d4e11eaa508383e35b510dc338e58b09c30be73
6666

67-
COPY ./patches/te.patch /tmp/te.patch
67+
COPY ./docker_build_patches/te.patch /tmp/te.patch
6868
RUN git clone --recurse-submodules https://github.com/NVIDIA/TransformerEngine.git /tmp/TransformerEngine && \
6969
cd /tmp/TransformerEngine && \
7070
git checkout --recurse-submodules ${TE_TAG} && \
@@ -354,7 +354,6 @@ FROM bionemo2-base AS release
354354
RUN mkdir -p /workspace/bionemo2/.cache/
355355

356356
COPY VERSION .
357-
COPY ./scripts ./scripts
358357
COPY ./README.md ./
359358
# Copy over folders so that the image can run tests in a self-contained fashion.
360359
COPY ./ci/scripts ./ci/scripts

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ The `bionemo-framework` is organized into independently installable namespace pa
2121
`sub-packages/` directory. Please refer to [PEP 420 – Implicit Namespace Packages](https://peps.python.org/pep-0420/)
2222
for details.
2323

24-
2524
## Documentation Resources
2625

2726
- **Official Documentation:** For user guides, API references, and troubleshooting, visit our [official documentation](https://docs.nvidia.com/bionemo-framework/latest/).
@@ -62,7 +61,6 @@ git submodule update --init --recursive
6261

6362
Different branches of the repo can have different pinned versions of these third-party submodules. Ensure submodules are automatically updated after switching branches or pulling updates by configuring git with:
6463

65-
6664
```bash
6765
git config submodule.recurse true
6866
```
@@ -72,14 +70,12 @@ You will have to run the full `git submodule update --init --recursive` command
7270

7371
#### Build the Docker Image Locally
7472

75-
7673
With a locally cloned repository and initialized submodules, build the BioNeMo container using:
7774

7875
```bash
7976
docker buildx build . -t my-container-tag
8077
```
8178

82-
8379
#### VSCode Devcontainer for Interactive Debugging
8480

8581
We distribute a [development container](https://devcontainers.github.io/) configuration for vscode

SECURITY.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ If you need to report a security issue, please use the appropriate contact point
77
## Reporting Potential Security Vulnerability in an NVIDIA Product
88

99
To report a potential security vulnerability in any NVIDIA product:
10+
1011
- Web: [Security Vulnerability Submission Form](https://www.nvidia.com/object/submit-security-vulnerability.html)
1112
- E-Mail: psirt@nvidia.com
12-
- We encourage you to use the following PGP key for secure email communication: [NVIDIA public PGP Key for communication](https://www.nvidia.com/en-us/security/pgp-key)
13-
- Please include the following information:
14-
- Product/Driver name and version/branch that contains the vulnerability
15-
- Type of vulnerability (code execution, denial of service, buffer overflow, etc.)
16-
- Instructions to reproduce the vulnerability
17-
- Proof-of-concept or exploit code
18-
- Potential impact of the vulnerability, including how an attacker could exploit the vulnerability
13+
- We encourage you to use the following PGP key for secure email communication: [NVIDIA public PGP Key for communication](https://www.nvidia.com/en-us/security/pgp-key)
14+
- Please include the following information:
15+
- Product/Driver name and version/branch that contains the vulnerability
16+
- Type of vulnerability (code execution, denial of service, buffer overflow, etc.)
17+
- Instructions to reproduce the vulnerability
18+
- Proof-of-concept or exploit code
19+
- Potential impact of the vulnerability, including how an attacker could exploit the vulnerability
1920

2021
While NVIDIA currently does not have a bug bounty program, we do offer acknowledgement when an externally reported security issue is addressed under our coordinated vulnerability disclosure policy. Please visit our [Product Security Incident Response Team (PSIRT)](https://www.nvidia.com/en-us/security/psirt-policies/) policies page for more information.
2122

ci/Pypi_publish.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
This is an overview of how to release bionemo sub-packages.
2+
3+
01. The code should be in a sub-directory of `bionemo-framework/sub-packages`. The package should be named bionemo-\<package_name>. For an example of the directory structure, see https://github.com/NVIDIA/bionemo-framework/tree/main/sub-packages/bionemo-scdl.
4+
The directory should contain:
5+
- a `pyproject.toml` file with the dependencies
6+
- a `README.md`
7+
- a `LICENSE` file
8+
- a `VERSION` file
9+
- the source code should be in src/bionemo/package-name.
10+
- the test should be in tests/bionemo/package-name. The test directory structure should be the same as the source code directory structure.
11+
02. Create some tests that can be run in a notebook within the package or as a small python script that verifies that the package is correctly installed. These can be re-purposed for QA test plan.
12+
03. In the VERSION file in the root of the sub-package, set the package version. Currently, the sub-package versions are independent of the overall BioNeMo version. An ideal approach is to specify the bionemo sub-package versions. That the package depends on. This may create issues. For example, an issue could arise if the latest version of your sub-package depends on the newest bionemo-core, but the latest pushed version of bionemo-core does not have these changes. It may be necessary to update bionemo-core then, but before updating another package, it should be tested and its authors should be consulted.
13+
04. Make sure that the directory dist doesn’t exist or is empty.
14+
05. Run `python -m build .`
15+
06. Create a test-pypi and pypi account if you don’t have one at: https://test.pypi.org/ and https://pypi.org/
16+
07. Upload to test-pypi with:
17+
`twine upload --repository-url https://test.pypi.org/legacy/ dist/* --non-interactive -u $TWINE_USERNAME -p $TWINE_PASSWORD`
18+
08. In a clean python environment, download the package from test-pypi:
19+
`pip install --index-url https://test.pypi.org/simple/ --no-deps package-name`
20+
09. Run the code/notebooks from step 3.
21+
10. If everything looks good, upload it to the actual pypi repository: `twine upload dist/* --non-interactive -u $TWINE_USERNAME -p $TWINE_PASSWORD --verbose`
22+
11. Run steps 7 and 8 with pypi instead of test-pypi.

ci/benchmarks/partial-conv/esm2_finetuning.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,28 @@ script: |-
7474
--disable-checkpointing \
7575
--early-stop-on-step=${stop_steps} \
7676
--create-tflops-callback;
77+
tests:
78+
- logic_type: static
79+
logic_spec:
80+
exit_codes:
81+
- 0
82+
baselines:
83+
consumed_samples:
84+
operator: eq
85+
value: 3072000.0
86+
val_loss:
87+
operator: range
88+
max: 0.6678
89+
min: 0.5630
90+
reduced_train_loss:
91+
operator: range
92+
max: 0.1372
93+
min: 0.0993
94+
TFLOPS_per_GPU:
95+
operator: range
96+
max: 719.5984
97+
min: 694.8020
98+
val_acc:
99+
operator: range
100+
max: 0.8462
101+
min: 0.7833

0 commit comments

Comments
 (0)