Reference package for tensor performance diagnostics, shape contracts, and device management in PyTorch model pipelines.
pip install -e .import tensor_systems_specs as tss
import torch
x = torch.rand((64, 3, 224, 224))
tss.trace_shape("Image batch", x)import tensor_systems_specs as tss
tss.set_seed(42)- Execution timing utilities — measure execution time for tensor operations or functions.
- Shape tracing — log shape, device, and dtype information.
- Device checks — ensure tensors are on the correct device (CPU/GPU) for computation.
- Reproducibility — set seeds across random, numpy, and torch for repeatable experiments.