Skip to content

Commit

Permalink
Bionemo demos (#2968)
Browse files Browse the repository at this point in the history
* updated bionemo demos to v1.8

* cleaned demos outputs for clarity

* added linces and fixed naming README

* fixed license headers and readme hyperlink

* black fixing code

* isort and flake8 fixes

* addressing PR changes

* removed unrequired infer copy file

* updated other runs files/configs and fixed path in downstream notebook

* fixed fedavg max_epochs setting to 1, removed extra data in taps yamls, fixed column used for each site

* changed fedavg* and local* yamls to have site specific data for tap. for sabdab fedavg changed to original ???

* also sabdab local changed dataset.train config to ???

* tap fix configurations

* update nb, nvflare version

* use strict false

* use full data for central training of sabdab

---------

Co-authored-by: Chester Chen <512707+chesterxgchen@users.noreply.github.com>
Co-authored-by: Holger Roth <6304754+holgerroth@users.noreply.github.com>
Co-authored-by: Holger Roth <hroth@nvidia.com>
  • Loading branch information
4 people authored Oct 4, 2024
1 parent 85a7e35 commit 4034ea3
Show file tree
Hide file tree
Showing 123 changed files with 3,117 additions and 2,552 deletions.
3 changes: 0 additions & 3 deletions examples/advanced/bionemo/.gitignore

This file was deleted.

32 changes: 9 additions & 23 deletions examples/advanced/bionemo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,25 @@

This directory contains examples of running BioNeMo in a federated learning environment using [NVFlare](https://github.com/NVIDIA/NVFlare).

1. The [task_fitting](./task_fitting/README.md) example includes a notebook that shows how to obtain protein learned representations in the form of embeddings using the ESM-1nv pre-trained model.
## Notebooks

In this repo you will find two notebooks under the `task_fitting` and `downstream` folders respectively:
1. The [task_fitting](./task_fitting/task_fitting.ipynb) notebook example includes a notebook that shows how to obtain protein learned representations in the form of embeddings using the ESM-1nv pre-trained model.
The model is trained with NVIDIA's BioNeMo framework for Large Language Model training and inference.
2. The [downstream](./downstream/README.md) example shows three different downstream tasks for fine-tuning a BioNeMo ESM-style model.
2. The [downstream](./downstream/downstream_nvflare.ipynb) notebook example shows three different downstream tasks for fine-tuning a BioNeMo ESM-style model.

## Requirements

Download and run the [BioNeMo docker container](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/clara/containers/bionemo-framework).
> **Note:** The examples here were tested with `nvcr.io/nvidia/clara/bionemo-framework:1.0`
> **Note:** The examples here were tested with `nvcr.io/nvidia/clara/bionemo-framework:1.8`
We recommend following the [Quickstart Guide](https://docs.nvidia.com/bionemo-framework/latest/quickstart-fw.html#docker-container-access)
We recommend following the [Quickstart Guide](https://docs.nvidia.com/bionemo-framework/latest/access-startup.html?highlight=docker)
on how to get the BioNeMo container.

First, copy the NeMo code to a local directory and configure the launch script so that downloaded models can be reused
```commandline
CONTAINER="nvcr.io/nvidia/clara/bionemo-framework:1.0"
DEST_PATH="."
CONTAINER_NAME=bionemo
docker run --name $CONTAINER_NAME -itd --rm $CONTAINER bash
docker cp $CONTAINER_NAME:/opt/nvidia/bionemo $DEST_PATH
docker kill $CONTAINER_NAME
```

Next, download the pre-trained models using
```commandline
cd ./bionemo
./launch.sh download
cd ..
```

Then, start the container and Jupyter Lab to run the NVFlare experiments with NVFlare using
Start the container and Jupyter Lab to run the NVFlare experiments with NVFlare using
```commandline
./start_bionemo.sh
```
It will start Jupyter Lab at `http://hostname:8888`.

For information about how to get started with BioNeMo refer to the [documentation](https://docs.nvidia.com/bionemo-framework/latest).
For information about how to get started with BioNeMo refer to the [documentation](https://docs.nvidia.com/bionemo-framework/latest).
124 changes: 0 additions & 124 deletions examples/advanced/bionemo/downstream/README.md

This file was deleted.

Loading

0 comments on commit 4034ea3

Please sign in to comment.