h5py is the library that allows to save data in HDF5 format. I did not change anything in h5py library source code, but in the data file that I was loading with h5py. It had some data in it that was saved using np.uint8. If you can, change the file generation so that it will use np.bool instead. If not, you need to convert the data to np.bool or torch.bool when loading the data.
PS! If you are just running someone else’s code and do not care about maintaining it, then just suppress this warning when running:
python -W ignore::UserWarning pythonscript.py
It will also suppress all other UserWarnings though…