Troubleshooting & FAQ¶
Common questions, error resolutions, and debugging tips for TrustBench.
1. Installation Issues¶
ModuleNotFoundError: No module named 'torch'¶
Cause: TrustBench was installed without the PyTorch extra. Fix: Install PyTorch support with:
ImportError: ONNX Runtime is required for ONNXModelAdapter¶
Cause: The ONNX extra is missing. Fix: Install with:
2. Configuration & Execution Issues¶
ValidationError: checkpoint_path does not exist¶
Cause: Relative paths in trustbench.yaml are resolved relative to the directory containing trustbench.yaml.
Fix: Ensure your path matches the location relative to the config file:
ShapeError: Expected probabilities of shape (N, C)¶
Cause: Your model's predict_proba() emitted an unexpected dimension or number of classes.
Fix: Verify that num_classes matches the number of columns returned by your model.
3. Hardware & GPU Placement¶
CUDA Out of Memory (OOM) during Evaluation¶
Fix: Reduce batch_size in your trustbench.yaml or constructor:
Forcing CPU Execution¶
To evaluate on CPU even when CUDA is present:
Or in Python: