Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions nemo/data-flywheel/e2e-llm-evaluation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Emergency Triage LLM Pipeline

Synthetic data generation and model evaluation for ESI triage classification — powered by NeMo Microservices Platform.

## Notebooks

| Notebook | Description |
|----------------------------------|---------------------------------------------------------------|
| `clinical_triage_pipeline.ipynb` | Combined end-to-end NDD + Evaluator use case in one notebook |

Run `clinical_triage_pipeline.ipynb` for the full pipeline in one place. It can be run locally with no GPU required.

## Quick Start

### 1. Create virtual environment

```bash
python3 -m venv .venv
source .venv/bin/activate

# Option A: with VPN / artifactory access
pip install 'nemo-platform[data-designer]==2.0.0.dev1+nightly20260309' \
--index-url https://urm.nvidia.com/artifactory/api/pypi/nv-shared-pypi/simple

# Option B: without VPN (e.g. on Brev) — download the wheel first via NGC CLI
pip install 'nemo-platform-python-sdk_v2.0.0.dev1+nightly20260309/nemo_platform-2.0.0.dev1+nightly20260309-py3-none-any.whl[data-designer]'

# Additional dependencies
pip install -r requirements.txt
python -m ipykernel install --user --name nmp --display-name "NMP (venv)"
```

### 2. Start NMP

```bash
nmp quickstart configure # NGC key → NVIDIA Build inference → save
nmp quickstart up --image nvcr.io/nvidian/nemo-llm/nmp-api:nightly-20260309
nmp quickstart status # Wait for health: ready
```

> **Important: Two different API keys are needed.**
> - `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.
> - Step 3 below requires a **build.nvidia.com key** (https://build.nvidia.com). This authenticates LLM inference calls.
>
> 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.

> **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`.

### 3. Register build.nvidia.com provider

Get your API key at [build.nvidia.com](https://build.nvidia.com) (separate from the NGC key used in step 2).

```bash
curl -s -X POST http://localhost:8080/apis/secrets/v2/workspaces/default/secrets \
-H "Content-Type: application/json" \
-d '{"name": "nvidia-build-api-key", "data": "<YOUR_BUILD_API_KEY>"}'

curl -s -X POST http://localhost:8080/apis/models/v2/workspaces/default/providers \
-H "Content-Type: application/json" \
-d '{"name": "nvidiabuild", "host_url": "https://integrate.api.nvidia.com/v1", "api_key_secret_name": "nvidia-build-api-key"}'
```

### 4. Run

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.

## Pipeline

<img src="./triage_pipeline_diagram.png" alt="Pipeline Diagram" width="700" style="max-width:700px;"/>

## NMP Commands

```bash
nmp quickstart status # Check cluster health
nmp quickstart logs # View logs
nmp quickstart down # Stop cluster
nmp quickstart destroy # Stop and remove all data
nmp quickstart doctor # Diagnose issues
```
Loading