ML debugging and profiling tools for Dala apps.
Provides tensor inspection, model profiling, and performance overlays for development and debugging.
Usage
# Inspect a tensor
Dala.ML.Debug.tensor_info(my_tensor)
# %{shape: {1, 224, 224, 3}, type: {:f, 32}, min: 0.0, max: 255.0, mean: 127.5}
# Profile inference
Dala.ML.Debug.profile(model, params, input, iterations: 100)
# %{avg_ms: 12.3, min_ms: 10.1, max_ms: 15.2, p95_ms: 14.1}
# Print model summary
Dala.ML.Debug.model_summary(model)
Summary
Functions
Compares outputs from two backends for consistency checking. Useful for validating CoreML vs ONNX vs Nx produce the same results.
Returns the current ML environment info for bug reports.
Prints a summary of the model architecture.
Profiles inference latency over multiple iterations.
Returns a map of tensor metadata for debugging.
Functions
@spec compare_outputs(Nx.Tensor.t(), Nx.Tensor.t(), keyword()) :: map()
Compares outputs from two backends for consistency checking. Useful for validating CoreML vs ONNX vs Nx produce the same results.
@spec environment_info() :: map()
Returns the current ML environment info for bug reports.
@spec model_summary(term()) :: :ok
Prints a summary of the model architecture.
Profiles inference latency over multiple iterations.
Returns timing statistics in milliseconds.
@spec tensor_info(Nx.Tensor.t()) :: map()
Returns a map of tensor metadata for debugging.