Closed yevkim closed 3 days ago
Hi I have tried to implement the search API (predicting schemes) on firebase and tested a little using Thunder Client.
Some notes:
ml_logic
folder (in backend
) which contains the code for the implementation of the Search algorithm can't really be accessed by main.py
in the functions
folder as the virtual environment is located within the functions
folder, so I duplicated the ml_logic
folder into the functions
folder instead. Might be able to use some form of symlink instead, or in production, store the code for the FastAPI app somewhere else and move the functions
venv up.Successfully implemented Search function with firestore but schemes embedding (.npy file) and index (.faiss file) needs to be re-generated.
Models, preprocessors and tokenizers are also initialised as a class variable so they can be initialised from main.py
Create the session id and return to frontend along with results Singleton Pattern - Check with Traci Loggin sessionid/queries/Results in the Firestore Deploy the function to firebase
MIgrate the search code to Firebase Function Explore keeping the vector files in Firebase Storage