|
| 1 | +# Emergency Triage LLM Pipeline |
| 2 | + |
| 3 | +Synthetic data generation and model evaluation for ESI triage classification — powered by NeMo Microservices Platform. |
| 4 | + |
| 5 | +## Notebooks |
| 6 | + |
| 7 | +| Notebook | Description | |
| 8 | +|----------------------------------|---------------------------------------------------------------| |
| 9 | +| `clinical_triage_pipeline.ipynb` | Combined end-to-end NDD + Evaluator use case in one notebook | |
| 10 | + |
| 11 | +Run `clinical_triage_pipeline.ipynb` for the full pipeline in one place. It can be run locally with no GPU required. |
| 12 | + |
| 13 | +## Quick Start |
| 14 | + |
| 15 | +### 1. Create virtual environment |
| 16 | + |
| 17 | +```bash |
| 18 | +python3 -m venv .venv |
| 19 | +source .venv/bin/activate |
| 20 | + |
| 21 | +# Option A: with VPN / artifactory access |
| 22 | +pip install 'nemo-platform[data-designer]==2.0.0.dev1+nightly20260309' \ |
| 23 | + --index-url https://urm.nvidia.com/artifactory/api/pypi/nv-shared-pypi/simple |
| 24 | + |
| 25 | +# Option B: without VPN (e.g. on Brev) — download the wheel first via NGC CLI |
| 26 | +pip install 'nemo-platform-python-sdk_v2.0.0.dev1+nightly20260309/nemo_platform-2.0.0.dev1+nightly20260309-py3-none-any.whl[data-designer]' |
| 27 | + |
| 28 | +# Additional dependencies |
| 29 | +pip install -r requirements.txt |
| 30 | +python -m ipykernel install --user --name nmp --display-name "NMP (venv)" |
| 31 | +``` |
| 32 | + |
| 33 | +### 2. Start NMP |
| 34 | + |
| 35 | +```bash |
| 36 | +nmp quickstart configure # NGC key → NVIDIA Build inference → save |
| 37 | +nmp quickstart up --image nvcr.io/nvidian/nemo-llm/nmp-api:nightly-20260309 |
| 38 | +nmp quickstart status # Wait for health: ready |
| 39 | +``` |
| 40 | + |
| 41 | +> **Important: Two different API keys are needed.** |
| 42 | +> - `nmp quickstart configure` requires the **NGC key** from the `nvidian/nemo-llm` org (https://org.ngc.nvidia.com/setup/api-key). This authenticates Docker image pulls. |
| 43 | +> - Step 3 below requires a **build.nvidia.com key** (https://build.nvidia.com). This authenticates LLM inference calls. |
| 44 | +> |
| 45 | +> If `configure` fails with `NGC login failed: unauthorized`, the NGC key is wrong — make sure you're in the `nvidian/nemo-llm` org when generating it. |
| 46 | +
|
| 47 | +> **Troubleshooting:** If batch jobs (`data_designer.create()`) get stuck at `created`, verify the jobs controller started by checking `nmp quickstart logs` for `Backend registry initialized with: docker`. If missing, reinstall with the exact nightly version: `pip install 'nemo-platform[data-designer]==2.0.0.dev1+nightly20260309'` and do a clean `nmp quickstart destroy` + `configure` + `up`. |
| 48 | +
|
| 49 | +### 3. Register build.nvidia.com provider |
| 50 | + |
| 51 | +Get your API key at [build.nvidia.com](https://build.nvidia.com) (separate from the NGC key used in step 2). |
| 52 | + |
| 53 | +```bash |
| 54 | +curl -s -X POST http://localhost:8080/apis/secrets/v2/workspaces/default/secrets \ |
| 55 | + -H "Content-Type: application/json" \ |
| 56 | + -d '{"name": "nvidia-build-api-key", "data": "<YOUR_BUILD_API_KEY>"}' |
| 57 | + |
| 58 | +curl -s -X POST http://localhost:8080/apis/models/v2/workspaces/default/providers \ |
| 59 | + -H "Content-Type: application/json" \ |
| 60 | + -d '{"name": "nvidiabuild", "host_url": "https://integrate.api.nvidia.com/v1", "api_key_secret_name": "nvidia-build-api-key"}' |
| 61 | +``` |
| 62 | + |
| 63 | +### 4. Run |
| 64 | + |
| 65 | +Open the notebook in Jupyter or Cursor. Select the `NMP (venv)` kernel, then run `clinical_triage_pipeline.ipynb` for the full end-to-end flow. |
| 66 | + |
| 67 | +## Pipeline |
| 68 | + |
| 69 | +<img src="./triage_pipeline_diagram.png" alt="Pipeline Diagram" width="700" style="max-width:700px;"/> |
| 70 | + |
| 71 | +## NMP Commands |
| 72 | + |
| 73 | +```bash |
| 74 | +nmp quickstart status # Check cluster health |
| 75 | +nmp quickstart logs # View logs |
| 76 | +nmp quickstart down # Stop cluster |
| 77 | +nmp quickstart destroy # Stop and remove all data |
| 78 | +nmp quickstart doctor # Diagnose issues |
| 79 | +``` |
0 commit comments