You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# To test or publish sub-packages or adjustments to this workflow that are branched in PR's, manually dispatch this workflow on the PR's branch here: https://github.com/NVIDIA/bionemo-framework/actions/workflows/bionemo-subpackage-ci.yml.
7
5
workflow_dispatch:
8
6
inputs:
9
7
subpackages:
10
8
description: BioNeMo sub-packages (comma-separated) to test or publish.
11
9
required: true
12
10
type: string
11
+
test:
12
+
description: Test the sub-packages before publishing to PyPI. Strongly recommended for production releases to PyPI. Can be disabled when staging sub-packages on Test PyPI or publishing circular dependencies to PyPI.
13
+
required: false
14
+
type: boolean
15
+
default: true
13
16
publish:
14
-
description: Publish the built package to PyPI.
17
+
description: Publish the built package to PyPI. If testing is specified, requires that all sub-package tests succeed based on dependencies published to Test PyPI or PyPI.
18
+
required: false
19
+
type: boolean
20
+
default: false
21
+
pypi:
22
+
description: Publish to PyPI instead of Test PyPI.
15
23
required: false
16
24
type: boolean
17
25
default: false
18
-
19
-
env:
20
-
# TODO(@cspades): Skip pytest for packages that require GPU's or special installation recipes until resolved.
Copy file name to clipboardExpand all lines: docs/docs/user-guide/contributing/contributing.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,12 +120,6 @@ Key behaviors:
120
120
- Skips entire CI pipeline
121
121
- Use for documentation typos, README updates
122
122
123
-
#### **SKIP_SUBPACKAGE_CI**
124
-
125
-
- Skips installation, testing, and publication of individual sub-packages of BioNeMo.
126
-
- For more granular controls on a per-package basis, such as skipping only testing or only publication to PyPI, you can modify hard-coded sub-package names (`bionemo-...`) listed within `SKIP...` variables in [`bionemo-framework/.github/workflows/bionemo-subpackage-ci.yml`](../../../../.github/workflows/bionemo-subpackage-ci.yml).
127
-
- Sub-package CI is enabled (not skipped) by default. Utilized to test individual BioNeMo sub-packages without the environmental support of the BioNeMo Framework Container, which validates if the sub-package can be pusblished standalone to PyPI.
128
-
129
123
#### **INCLUDE_NOTEBOOKS_TESTS**
130
124
131
125
- Enables notebook validation tests
@@ -259,7 +253,7 @@ The resulting altered baseline files should then be committed.
259
253
- Unit tests not associated with source code in BioNeMo can be placed anywhere reasonable under `tests/bionemo/<package-name-suffix>`.
260
254
- Verify that the `pyproject.toml` is `pip install`-able (and `python -m build`-able).
261
255
- If the sub-package is publishable, follow the instructions in [Publishing to PyPI](#publishing-to-pypi) to register or link your package to the sub-package workflow in BioNeMo Framework.
262
-
-If the sub-package cannot be installed, built, or published to PyPI, add the name of this sub-package to `SUBPACKAGE_SKIP_TEST` and `SUBPACKAGE_SKIP_PUBLISH` in [`bionemo-framework/.github/workflows/bionemo-subpackage-ci.yml`](../../../../.github/workflows/bionemo-subpackage-ci.yml).
256
+
-Add test dependencies to a `test` field under `[project.optional-dependencies]` for test-only dependencies.
263
257
264
258
### Publishing to PyPI
265
259
@@ -276,27 +270,33 @@ To publish your sub-package via "Trusted Publishing" to PyPI, you can follow the
276
270
- Environment Name:
277
271
-`pypi` for PyPI
278
272
-`testpypi` for Test PyPI
279
-
-**NVIDIA-Only**: Run the workflow!
280
-
- Create or update any PR with `git diff` changes to your `bionemo-framework/sub-packages`.
281
-
- Publishes to Test PyPI.
282
-
- Dispatch the `bionemo-subpackage-ci.yml` workflow from GitHub Actions.
283
-
- Publishes to PyPI.
284
-
- Required: Input a comma-separated list of sub-packages you want to test and/or publish into `subpackages`.
285
-
- Optional: Set `publish` to `true` if you want to publish to PyPI. (Default: `false`)
273
+
-**NVIDIA-Only**: Run the workflow! For more information, refer to: [Sub-Package GitHub Actions Workflow](#sub-package-github-actions-workflow)
286
274
-**Optional**: Add `bionemo` as an owner or maintainer of the PyPI package if you want help maintaining it.
287
275
-**Disclaimer**: If this is not done, and the package becomes dysfunctional, then NVIDIA / BioNeMo are not responsible for the health of the package or the sub-package source code, because we will not have the ability to deprecate versions, etc.
288
276
289
-
### Sub-Package CI Workflow Key Points
277
+
### Sub-Package GitHub Actions Workflow
278
+
279
+
- Dispatch the `bionemo-subpackage-ci.yml` workflow from GitHub Actions to test, build, and publish your sub-packages to PyPI!
280
+
- Required: Input a comma-separated list of sub-packages you want to test and/or publish into `subpackages`.
281
+
- For example, `bionemo-moco,bionemo-llm,bionemo-webdatamodule`. The sub-packages will be tested and published in separate parallel environments.
282
+
- Optional: Set `test` to `true` if you want to test your sub-package. (Default: `true`)
283
+
- Sub-packages that require pre- or post- installation steps may require modification of the `install-and-test` job in [`bionemo-framework/.github/workflows/bionemo-subpackage-ci.yml`](../../../../.github/workflows/bionemo-subpackage-ci.yml).
284
+
- Optional: Set `publish` to `true` if you want to publish to Test PyPI or PyPI. (Default: `false`)
285
+
- Pre-Requisite: [BioNeMo Publishing to PyPI](#publishing-to-pypi)
286
+
- Publishing requires package building, but does not require testing for flexibility of package management.
287
+
- Optional: Publishes to Test PyPI by default. To publish to PyPI, check `Publish to PyPI instead of TestPyPI`.
288
+
289
+
### FAQ
290
290
291
-
- Individually `pip install`, `pytest`, and `python -m build` every supported sub-package before publishing to PyPI.
292
-
- Triggered by PR changes (which publish to Test PyPI) or manually-dispatched GitHub Actions Workflows.
293
-
- TODO(@cspades): PR workflows are deactivated pending sufficient compute resources. To reactivate them in your PR, uncomment the PR trigger in [`bionemo-framework/.github/workflows/bionemo-subpackage-ci.yml`](../../../../.github/workflows/bionemo-subpackage-ci.yml).
294
-
-`SUBPACKAGE_SKIP_TEST` and `SUBPACKAGE_SKIP_PUBLISH` in [`bionemo-framework/.github/workflows/bionemo-subpackage-ci.yml`](../../../../.github/workflows/bionemo-subpackage-ci.yml) control whether your sub-package is installed/tested or published to PyPI.
- What do I do if I want to test and publish two updated sub-packages that depend on each other?
292
+
- To deal with circular dependencies, publish one package to PyPI first, followed by testing and publishing the other. `pip` installs dependencies in reverse topological order, and will resolve / break circular dependencies as long as dependency conflicts do not exist. (If dependency conflicts exist, resolve them!)
293
+
- For example, if `A` depends on `B`, and `B` depends on `A`...
294
+
- Publish `B` to PyPI without testing. Untested sub-packages will be published with the version suffix `*-dev`.
295
+
- Set `A` to depend on the latest version (i.e. the `*-dev` version) of `B`.
296
+
- Test and publish `A` to PyPI.
297
+
- Test and publish `B` (which depends on the now-released `A`) to PyPI.
297
298
298
299
### TODO
299
300
300
301
- Support building packages that have installation dependencies, such as `bionemo-noodles` dependent on `maturin` or `bionemo-<model>` dependent on `transformer-engine`.
301
-
- Support unit tests that require GPU.
302
302
- Automatically cut a release tag for the sub-package via GHA.
Copy file name to clipboardExpand all lines: sub-packages/bionemo-amplify/src/bionemo/amplify/train_amplify.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -307,7 +307,7 @@ def main(
307
307
save_top_k=save_top_k,
308
308
every_n_train_steps=val_check_interval,
309
309
always_save_context=True, # Enables the .nemo file-like checkpointing where all IOMixins are under SerDe
310
-
filename="{epoch}-{val_loss:.2f}-{step}-{consumed_samples}", # Including step and consumed_samples in the checkpoint filename prevents duplicate filenames and bugs related to this.
310
+
filename="{epoch}-{step}-{consumed_samples}", # Including step and consumed_samples in the checkpoint filename prevents duplicate filenames and bugs related to this.
0 commit comments