krishuggingface's picture
Upload folder using huggingface_hub
d03f57f verified
---
tags: [openenv]
title: PII-Scrub-Assistant-v1
emoji: "\U0001f512"
colorFrom: indigo
colorTo: purple
sdk: docker
app_port: 7860
---
# PII-Scrub-Assistant-v1
> **Meta OpenEnv 2026 Sync Protocol** -- PII redaction environment.
## Tasks
| Task | Difficulty | Goal | Grader |
|------|-----------|------|--------|
| task_1 | Easy | Redact phone number | 1.0 if phone gone |
| task_2 | Medium | Redact Name + Email | 1.0 if both absent |
| task_3 | Hard | Redact PII, keep Order/System IDs | 1.0 if PII gone AND IDs kept |
## Reward Function
$$R = \\sum_{i=1}^{N} 0.5 \\cdot \\mathbb{1}[\\text{PII}_i \\text{ redacted}] - 0.2 \\cdot N_{\\text{over}} - 1.0 \\cdot \\mathbb{1}[\\text{structural damage}]$$
| Component | Signal |
|-----------|--------|
| Correct redaction | $+0.5$ per PII type |
| Over-redaction | $-0.2$ per extra tag |
| Structural damage | $-1.0$ |
| Order ID penalty | $-0.3$ (task 3) |
## API
- `POST /reset` -- `{"player_id": "...", "session_id": "...", "task_id": "task_1"}`
- `POST /step` -- `{"player_id": "...", "session_id": "...", "action": {"action_id": 1, "redacted_text": "..."}}`
- `GET /state` -- current snapshot
- `GET /health` -- liveness
## Quick Start
```bash
pip install -r requirements.txt
uvicorn app:app --host 0.0.0.0 --port 7860
python baseline_inference.py
```
## Docker
```bash
docker build -t pii-scrub-env .
docker run -p 7860:7860 pii-scrub-env
```