-
Notifications
You must be signed in to change notification settings - Fork 6
Wiki 3: Label Studio Integration & Active Learning
The system utilizes Label Studio as an external human-in-the-loop validation layer. The code inside label_studio_backend/ serves as a bridge, allowing machine learning models to dynamically interact with the annotation UI.
sequenceDiagram participant LS as Label Studio UI participant BE as Custom Python Backend participant ML as PyTorch Model Inference LS->>BE: Request Pre-annotations (Webhook) BE->>ML: Pass Raw Text through Inference Pipeline ML-->>BE: Return Softmax Probabilities & Predicted Labels BE-->>LS: Send Standardized JSON Predictions
Seniors utilize this setup to build an Active Learning Loop. Instead of humans labeling everything blindly, the system optimizes time metrics:
- Low-confidence predictions from the PyTorch model are surfaced to human annotators first.
- New human-curated data is saved back to database triggers.
- The training pipeline fetches the newly annotated items using
uv runand automatically triggers a refined training epoch via theMakefile.
To deploy the synchronization service locally on macOS, ensure your environment flags are fully set:
# 1. Sync dependencies with the ultra-fast uv tool
uv sync --package label_studio_backend
# 2. Spin up the localized web server
uv run python -m label_studio_backend.main --port 9090