- SapFix is a tool that automatically debugs your programming script
- It’s intelligent enough to evaluate various bug fixes and provide a recommendation to the engineers
- Facebook plans to open source the tool in the near future once it has finished designing the finer details
Debugging code is a tedious and cumbersome task. I’m yet to meet a data scientist or data engineer who looks forward to minutely combing through his/her code to look for what went wrong (and I suspect I won’t be meeting this person anytime soon).
There have been a few releases this year focusing on automatically finding errors in your programming script. And now Facebook is the most high profile company to throw it’s hat into the ring with the announcement of SapFix.
Even though SapFix is an independent tool, Facebook is currently using it concurrently with Sapienz, another software testing tool used within the company. As of today, Sapienz finds bugs in the programs and SapFix works on fixing them before the code reaches the production environment.
The below workflow, taken from Facebook’s blog post, describes how SapFix works:
SapFix generates multiple potential fixes for each bug. It is then designed to evaluate their quality on the basis of three factors:
- Compilation errors
- Does the crash keep on happening?
- Are there new crashes from the fixed code?
Once the code has been fully tested, the tool sends them over to a human engineer for approval. Sounds pretty similar to how most testing work goes, right? SapFix is intelligent enough to even give it’s own recommendations to the engineers, based on the above evaluation criteria.
While Sapienz is in almost wide-scale use at Facebook, SapFix is still in a pretty nascent stage. The engineering teams are working to craft the finer details and round the edges before it’s fully deployed in day-to-day operations within the organization. And once that’s done, they plan to open source to the wider ML community.
Our take on this
If you’re one of those rare people who loves programming so much that debugging doesn’t feel like a burden, I tip my hat to you. I find it a very arduous task and one I would love to avoid. I’ve been using PixieDebugger lately for Python, and that has certainly helped me get an intuitive feel for where I’m going wrong.
But to automate the entire process? What a welcome announcement! I can’t wait for SapFix to be open sourced.
Subscribe to AVBytes here to get regular data science, machine learning and AI updates in your inbox!