NicolasHug / Surprise

A Python scikit for building and analyzing recommender systems
http://surpriselib.com
BSD 3-Clause "New" or "Revised" License
6.28k stars 1k forks source link

create dataset folder only when needed #459

Open sbrnaderi opened 1 year ago

sbrnaderi commented 1 year ago

Issue I encountered

I was trying to run inference on a AWS Lambda function that has a read-only filesystem and I got an error that the dataset folder cannot be created (because the available disk was read-only). Looking at the error stack I found out that the issue is that Surprise tries to create the dataset folder even when user does not want to use the built-in datasets.

Fix

In my opinion, it is better to create the the dataset folder when it is actually needed. I have made the code change necessary for this (see that changes in this pull request). I ran all the tests in the tests folder after this change and they all pass, but please let me know if you think more tests are needed.