According to https://docs.python.org/3.11/library/importlib.resources.html, "Exiting the context manager cleans up any temporary file created when the resource was extracted from e.g. a zip file.". With versions of python >3.7, this makes it impossible to return just the string of the path, as it will be sth in /tmp folder that would get deleted. Therefore loading the matlab data was moved inside the context manager. The .path paradigm is also being deprecated as of version 3.11, so I used the files/as_file approach given here https://importlib-resources.readthedocs.io/en/latest/using.html
The changes were tested with the 2 smaller scale jupyter examples.
It does seem to work. (And theoretically, the below PR only touches dataloading).
Hi!
According to https://docs.python.org/3.11/library/importlib.resources.html, "Exiting the context manager cleans up any temporary file created when the resource was extracted from e.g. a zip file.". With versions of python >3.7, this makes it impossible to return just the string of the path, as it will be sth in
/tmp
folder that would get deleted. Therefore loading the matlab data was moved inside the context manager. The.path
paradigm is also being deprecated as of version 3.11, so I used the files/as_file approach given here https://importlib-resources.readthedocs.io/en/latest/using.htmlThe changes were tested with the 2 smaller scale jupyter examples.
![image](https://user-images.githubusercontent.com/8327849/175950693-6debff87-55e4-48b5-af72-b20fb5aa15c7.png)
It does seem to work. (And theoretically, the below PR only touches dataloading).