Skip to content
Merged
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
8 changes: 1 addition & 7 deletions docs/anonymizer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The service wraps the open-source [NVIDIA NeMo Anonymizer library](https://githu
The library defines **what** to anonymize and **how**. The platform decides **where the work runs** and **how models are reached**.

!!! note
The code snippets below are for conceptual demonstration purposes only. For runnable examples, see the [quickstart](quickstart.md) and [tutorials](tutorials/index.md).
The code snippets below are for conceptual demonstration purposes only. For runnable examples, see the [tutorials](tutorials/index.md).

### 1. Build a config with the library

Expand Down Expand Up @@ -106,12 +106,6 @@ This package is a thin wrapper around the [NVIDIA NeMo Anonymizer library](https

<div class="grid cards" markdown>

- **[Quick Start](quickstart.md)**

---

Install the plugin, configure inference, and run your first preview and job.

- **[Tutorials](tutorials/index.md)**

---
Expand Down
277 changes: 0 additions & 277 deletions docs/anonymizer/quickstart.md

This file was deleted.

62 changes: 58 additions & 4 deletions docs/anonymizer/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,65 @@ When using Anonymizer as a {{platform_name}} service:

## Prerequisites

Before starting these tutorials, complete the [Quick Start](../quickstart.md) to:
Complete [Setup](../../get-started/setup.md) to install {{platform_name}}, run `nemo services run`, and configure an inference provider. The root workspace includes the Anonymizer plugin, so `nemo services run` discovers it automatically and mounts `/apis/anonymizer/...` on the gateway — no separate plugin install step is needed. Verify the CLI is registered:

- Install the plugin and verify the `nemo anonymizer` CLI.
- Configure an inference provider used in `model_configs`.
- Create a fileset and upload a CSV containing PII.
```bash
nemo anonymizer --help
```

You should see `validate`, `preview`, and `run` command groups.

These tutorials route inference through an [Inference Gateway](../../run-inference/about.md) provider, so a {{platform_name}} cluster must be running before you preview or run a job. The examples reference the default NVIDIA Build provider created during setup.

--8<-- "_snippets/nvidia-build-model-provider.md"

### Upload an Input Fileset

`sdk.anonymizer.preview`, `preview submit`, and `run submit` reject local file paths, so the tutorials read from a fileset. Create a small CSV containing PII and upload it to a fileset named `anonymizer-inputs`:

```python
import os
import tempfile
from pathlib import Path

from nemo_platform import NeMoPlatform
from nemo_platform._exceptions import ConflictError

WORKSPACE = os.environ.get("NMP_WORKSPACE", "default")
FILESET = "anonymizer-inputs"
INPUT_FILENAME = "anonymizer-input.csv"

sdk = NeMoPlatform(
base_url=os.environ.get("NMP_BASE_URL", "http://localhost:8080"),
workspace=WORKSPACE,
)

with tempfile.NamedTemporaryFile("w", suffix=".csv", delete=False) as f:
f.write(
"id,biography\n"
"1,Alice Johnson lives in Seattle and works at NVIDIA.\n"
"2,Bob Smith can be reached at bob.smith@example.com.\n"
)
input_path = Path(f.name)

try:
sdk.files.filesets.create(
name=FILESET,
workspace=WORKSPACE,
description="Anonymizer input files",
)
except ConflictError:
pass # already exists

sdk.files.upload(
local_path=str(input_path),
fileset=FILESET,
workspace=WORKSPACE,
remote_path=INPUT_FILENAME,
)
```

The tutorials reference this file with `fileset://{WORKSPACE}/anonymizer-inputs#anonymizer-input.csv`.

## Tutorials

Expand Down
8 changes: 5 additions & 3 deletions docs/anonymizer/tutorials/preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ For detection and replacement strategy details, see the [open-source library doc

## Prerequisites

- The Anonymizer plugin installed and the `nemo anonymizer` CLI available. See the [Quick Start](../quickstart.md).
Complete the [tutorials prerequisites](index.md#prerequisites), which cover:

- A running {{platform_name}} cluster with the `nemo anonymizer` CLI available (see [Setup](../../get-started/setup.md)).
- An inference provider configured (default examples use `nvidia-build`).
- A fileset named `anonymizer-inputs` with `anonymizer-input.csv` uploaded (created in the Quick Start).
- A fileset named `anonymizer-inputs` with `anonymizer-input.csv` uploaded.

## What `preview` Does

Expand Down Expand Up @@ -172,7 +174,7 @@ jq -R 'fromjson? | select(.kind == "preview_dataset") | .records' \
/tmp/anonymizer-preview.ndjson
```

If `preview submit` returns 404 against the gateway, the plugin service isn't mounted. Confirm the plugin is installed and restart `nemo services run`; see [Quick Start — Step 1](../quickstart.md#step-1-install-the-plugin).
If `preview submit` returns 404 against the gateway, the plugin service isn't mounted. Restart `nemo services run` so the plugin is discovered and remounts `/apis/anonymizer/...`; see [Setup](../../get-started/setup.md).

## Input Source Forms

Expand Down
Loading
Loading