transformerlab / transformerlab-app

Experiment with Large Language Models
GNU Affero General Public License v3.0
243 stars 12 forks source link

sqlite3.OperationalError: database is locked when downloading model #112

Open dadmobile opened 1 week ago

dadmobile commented 1 week ago

Sometimes when you download models in the Model Zoo the database gets locked. Then you need to go and kill the stray download process or you can't use the app.

The fix is possibly to change all of our db connections to use isolation_level=None, which will prevent SQLite from implicitly starting transactions everywhere.

dadmobile commented 1 week ago

Add you to this Safiya. I'm making the change in the plugins right now, but if you can help make this change to download_huggingface_model.py and test that it fixes things for you, then it would make me feel a lot more confident (since you seem to be able to reproduce eaisly).