Getting Started
The three MLdebugger workflows, and the shortest path to a first run.
The three workflows
1. Tracing + Evaluation
The basic workflow: collect inference log data and run evaluations.
- Collect data with the
Tracerfor your task (Classification / Object Detection / 3D) - Run evaluations with
Evaluator, review results withResult
2. DataFiltering
The workflow for selecting and filtering data based on error patterns.
- Use
ClassificationDataFilter/ObjectDetectionDataFilter/ObjectDetection3DDataFilter - Supports batch queries and real-time filtering
3. Logging
The workflow for collecting and monitoring inference logs from models in production.
- Use
ClassificationLogger/ObjectDetectionLogger/ObjectDetection3DLogger - Monitor model inference behavior in the web app
Try it
- Log in — after installation, run
mldebugger login(the SDK uses the same credentials). - Trace and evaluate a model — trace your model's inference with the SDK and request an evaluation (code below).
- Check the results — via
result.get_summary(), the Terminal App (mldebugger), or the Web App.
import torch
from ml_debugger.training import ClassificationTracer
from ml_debugger.evaluator import Evaluator
from ml_debugger.data_filter import ClassificationDataFilter
# 1) Trace inference over labeled data (collects internal features + labels)
tracer = ClassificationTracer(model, model_name="my_model", version_name="v1")
for images, labels, ids in train_loader: # ids: a unique ID per sample (implement your Dataset to return it)
tracer(images, labels, input_ids=ids, dataset_type="train")
tracer.wait_for_save() # wait for the save and upload to the server
# 2) Evaluate
evaluator = Evaluator(model_name="my_model", version_name="v1")
result = evaluator.request_evaluation()
result.get_summary()
# 3) Pick the data that will help training next (no labels needed)
data_filter = ClassificationDataFilter(model, "my_model", "v1", result_name=result.result_name)
for images, _, ids in pool_loader:
with torch.no_grad():
data_filter(images, input_ids=ids)
picked = data_filter.query(n_data=100, strategy="high_error_proba")
For per-epoch collection inside a training loop and Object Detection / 3D, see Tracing + Evaluation; for data selection details, see DataFiltering. From an evaluated Result you can also use Agent Analysis (analysis notes, AL strategy recommendation) and heatmaps.