This repository is a demo for handling the scheduling of save and load functionality provided by the library ANNOY(Approximate Nearest Neighbor)
When trying to load and save the model in production, we shoud handle the exception that can occur, Gotta observe, the exception can occur either while saving or while loading, (may run to this issue in a very acute possibility, but it's good to be taken care of.)
ANNOY:
https://github.com/spotify/annoy
Install ANNOY:
pip install annoy
Reproduce error:
In the first terminal:
python .\annoy_database_update.py
In another terminal:
python .\annoy_rec_service.py
Solution:
In the first terminal:
python .\annoy_database_update.py
In another terminal:
python .\annoy_rec_service_exception_handled.py