Hello,
There seems to be a bug where if there's an array of strings, the load_instance method is called again on the sample:
https://github.com/Lightning-Universe/lightning-bolts/blob/0290ab0ad7824a9917935af0975244f01a6e1ca7/src/pl_bolts/datamodules/async_dataloader.py#LL79C3-L81C10
elif elem_type.__module__ == "numpy" and elem_type.__name__ != "str_" and elem_type.__name__ != "string_":
if elem_type.__name__ == "ndarray" and self.np_str_obj_array_pattern.search(sample.dtype.str) is not None:
return self.load_instance(sample)
I think the correct version would just return the sample, like so:
elif elem_type.__module__ == "numpy" and elem_type.__name__ != "str_" and elem_type.__name__ != "string_":
if elem_type.__name__ == "ndarray" and self.np_str_obj_array_pattern.search(sample.dtype.str) is not None:
return sample
This works in my case. If it's acceptable, please let me know so I'll open a pull request.