Connected stockfish to the frontend and can now send all eval data to the backend. idk why it took me so long i was kinda distracted half the time lmao. Oh wait, I had to make some fixes in the backend and frontend cuz it had so many bugs because I forgot to actually run the backend to test. Prob because I thought it was too much hassle to migrate everything n all
In this session I removed one of the most expensive parts of running DeepPly, which was the stockfish server. Initially, I had batched all stockfish analyses to a cloud server with multiple stockfish instances. To reduce analysis time, I used a persistent position db to store all previously analyzed positions and I had to use a at least 4 cpu core server. Now, the stockfish analysis can be done on the users computer directly, which is how top sites like chess.com and lichess do it. Im done with the django side of it, and will do the client side next session. Also I added django-environ for robust environment variable handling, started using logging library in 2 files as well.
I think im gonna have to do this for a while. Today I cleaned up the lichess import code, to make it less error prone. Rn the main issue was that I wasnt using .get, so it would throw errors if key wasnt found, now it handles much better. Although a lot of time was spent on changing the game model as I wanted more info and better indexing n all. I think next session will be more cleanup and making the code look actually production level before I move on with the ui changes
When I shipped during flavortown, the code for handling and executing analysis was kinda messy, so I streamlined it to highlight the task status n all using only my model instead of celery’s task result, and made the updating part more robust and removed any potential race conditions