Skip to content

Commit c498ede

Browse files
authored
Fix typos in ESM2 finetune notebook (#1023)
### Description Fixes path references in the ESM2 fine-tune Jupyter notebook. ### Type of changes <!-- Mark the relevant option with an [x] --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Refactor - [ ] Documentation update - [ ] Other (please describe): ### CI Pipeline Configuration Configure CI behavior by applying the relevant labels: - [SKIP_CI](https://github.com/NVIDIA/bionemo-framework/blob/main/docs/docs/user-guide/contributing/contributing.md#skip_ci) - Skip all continuous integration tests - [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 - [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 > [!NOTE] > By default, the notebooks validation tests are skipped unless explicitly enabled. #### Authorizing CI Runs We use [copy-pr-bot](https://docs.gha-runners.nvidia.com/apps/copy-pr-bot/#automation) to manage authorization of CI runs on NVIDIA's compute resources. * If a pull request is opened by a trusted user and contains only trusted changes, the pull request's code will automatically be copied to a pull-request/ prefixed branch in the source repository (e.g. pull-request/123) * If a pull request is opened by an untrusted user or contains untrusted changes, an NVIDIA org member must leave an `/ok to test` comment on the pull request to trigger CI. This will need to be done for each new commit. ### Usage <!--- How does a user interact with the changed code --> ```python TODO: Add code snippet ``` ### Pre-submit Checklist <!--- Ensure all items are completed before submitting --> - [x] I have tested these changes locally - [x] I have updated the documentation accordingly - [x] I have added/updated tests as needed - [x] All existing tests pass successfully Signed-off-by: Bruno Alvisio <balvisio@nvidia.com>
1 parent a5a2af9 commit c498ede

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

sub-packages/bionemo-esm2/examples/finetune.ipynb

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -867,14 +867,14 @@
867867
"print(f\"sequence_classification_target {sequence_classification_target}\")\n",
868868
"print(f\"predicted_classes {predicted_classes}\")\n",
869869
"assert test_acc > 0.55\n",
870-
"print(f\"test acc is {test_loss}\")"
870+
"print(f\"test acc is {test_acc}\")"
871871
]
872872
},
873873
{
874874
"cell_type": "markdown",
875875
"metadata": {},
876876
"source": [
877-
"### Toke-level Classification data"
877+
"### Token-level Classification data"
878878
]
879879
},
880880
{
@@ -1187,12 +1187,12 @@
11871187
},
11881188
{
11891189
"cell_type": "code",
1190-
"execution_count": 32,
1190+
"execution_count": null,
11911191
"metadata": {},
11921192
"outputs": [],
11931193
"source": [
11941194
"lora_checkpoint_path = (\n",
1195-
" f\"{work_dir}/lora-token-level-classification/checkpoints/checkpoint-step=49-consumed_samples=100.0-last/weights\"\n",
1195+
" f\"{work_dir}/lora-token-level-classification/checkpoints/checkpoint-step=49-consumed_samples=100.0-last\"\n",
11961196
")\n",
11971197
"results_path = f\"{work_dir}/lora-token-level-classification/infer/\""
11981198
]
@@ -1216,12 +1216,12 @@
12161216
},
12171217
{
12181218
"cell_type": "code",
1219-
"execution_count": 34,
1219+
"execution_count": null,
12201220
"metadata": {},
12211221
"outputs": [],
12221222
"source": [
12231223
"%%capture --no-display --no-stderr cell_output\n",
1224-
"data_path = os.path.join(work_dir, \"sequences.csv\")\n",
1224+
"data_path = os.path.join(work_dir, \"test_token_classification.csv\")\n",
12251225
"\n",
12261226
"! infer_esm2 --checkpoint-path {pretrain_checkpoint_path} \\\n",
12271227
" --config-class ESM2FineTuneTokenConfig \\\n",
@@ -1235,6 +1235,15 @@
12351235
" --include-input-ids \\\n",
12361236
" --lora-checkpoint-path {lora_checkpoint_path}"
12371237
]
1238+
},
1239+
{
1240+
"cell_type": "code",
1241+
"execution_count": null,
1242+
"metadata": {},
1243+
"outputs": [],
1244+
"source": [
1245+
"assert _exit_code == 0 # noqa: F821"
1246+
]
12381247
}
12391248
],
12401249
"metadata": {

0 commit comments

Comments
 (0)