Run an Anonymizer Job
This tutorial walks through the anonymizer.run job: defining a run spec, submitting it to the NeMo Platform Jobs worker, and loading the parquet artifacts it produces.
For detection, rewrite, and replacement strategy details, see the open-source library documentation.
Prerequisites
Complete the tutorials prerequisites, which cover:
- A running NeMo Platform cluster with the
nemo anonymizerCLI available (see Setup). - An inference provider configured (default examples use
nvidia-build). - A fileset named
anonymizer-inputswithanonymizer-input.csvuploaded.
What run Does
anonymizer.run executes the full Anonymizer pipeline on every record of an input file and writes the output as job artifacts.
The CLI exposes one run command:
Job artifacts (under the artifacts/ directory):
Step 1: Build an AnonymizerRequest
AnonymizerRequest contains the execution fields shared by preview and run (config, data, model_configs, and selected_models). A run processes the full input file, so it does not include num_records:
Step 2: Write the Spec to YAML
The CLI run command reads a YAML spec file. Serialize the AnonymizerRequest directly:
Step 3: Run the Job
Submit the spec to the NeMo Platform Jobs worker:
The command prints the assigned job name. You need that name to poll status and download artifacts in Step 4.
The SDK equivalent is sdk.anonymizer.run(request). It posts the request to the plugin’s /jobs/run endpoint and returns an AnonymizerJobResource:
The run path rejects local file paths in data.source — use a fileset reference (<fileset>#<path>) or http(s) URL. It also requires explicit model_configs referencing Inference Gateway providers.
Step 4: Get Results
Track the platform job first. The job is ready for artifact download when its status is completed:
To download from the CLI, fetch the artifacts result and extract it:
Then point AnonymizerJobResults at the extracted artifacts directory:
If you used the SDK, use the AnonymizerJobResource methods directly. get_job_status() reads the current status, check_if_complete() tests whether artifacts are ready, wait_until_done() blocks until a terminal state, and download_artifacts() downloads and extracts the result:
AnonymizerJobResults exposes load_dataset(), load_trace(), load_failed_records(), and display_record() over the same underlying files. See SDK Resources.
How the Job Compiles
For each request, the plugin:
- Validates the Anonymizer library
AnonymizerConfig. - Validates the input source (rejects local paths; checks fileset refs).
- Validates that
selected_modelsoverrides also havemodel_configs. - Resolves
model_configsproviders through the Inference Gateway. - Renders a unified
model_configsYAML body for the library. - Stores the resolved providers and YAML in the internal
AnonymizerStepConfigconsumed by the Jobs worker.
Provider endpoints are re-resolved at runtime so the job uses the in-cluster Inference Gateway address rather than the address captured at submission time.
Next Steps
- Iterate faster with preview before scaling to a full job.
- Refer to SDK Resources for
AnonymizerJobResourceandAnonymizerJobResultsdetails. - Replacement strategy parameters and rewrite mode are documented in the library docs.