Removing torch.sparse from the Gradient PyTorch container

What’s torch.sparse?
It’s a class of multidimensional arrays where the contiguous memory storage of array elements turns out to be suboptimal. Sparse arrays have the property of having a vast portion of elements being equal to zero which means that a lot of memory, as well as processor resources, can be spared if only the non-zero elements are stored or/and processed.

Under certain circumstances, it may be needed to remove this and other packages from the container depending on your requirements.

How to remove it?

To remove this or another package within the PyTorch container, please ensure to select the correct environment by running conda activate base and then use pip to remove the package with pip uninstall torch_sparse.

1 Like