andrey.describe#
- andrey.describe()[source]#
The backend and worker settings in effect, with package and device availability.
Each operation picks its own implementation, so the report gives the preference, not the backend a given call will use. Checking whether the
torchmodule is installed does not import it. GPU checks may import it on macOS or when the build supports CUDA or ROCm; an unrecognized build is also checked by importing it.- Returns:
A read-only snapshot with the fields
backend(the preference, such as"auto"),num_workers(-1means every usable core),torch(whether the module is installed or already imported), andcudaandmps(whether PyTorch reports a usable device).available_backends()mapsnumpy,cpu,cuda, andmpsto availability;cpuuses thetorchfield.as_dict()returnsbackend,num_workers, and this availability mapping as a JSON-ready dict.- Return type:
Backend- Raises:
ValueError – If a setting read from
ANDREY_BACKEND,ANDREY_DEVICE, orANDREY_NUM_WORKERSholds an invalid value; a context or config override takes precedence over those variables.