by iforgotmypasswo · 1mo ago · 0 comments
I needed to make a highly parallel image processing pipeline which interleaved traditional techniques and VLM use, as well as allowing speculative execution and backtracking.
Using AI, I was able to create a really nice custom IDE for this, along with the simplest possible representation of the high level processing strategy in Python.
Despite the high level code reading very simply (for parallel image processing with speculative execution), AI is completely unable to reason between it and what it is accomplishing.
I was thinking that once I made the problem “pretty” AI was going to steal it from me, but I actually get to program something for the first time in a year! Hooray!
That said, it's true that all the default decisions it initially took were not good. I had to keep insisting that the solution should scale linearly with number of workers. With every additional feature or adjustment, it kept adding shared processing bottlenecks, even though it required less than 20% extra code to keep it embarrassingly parallel. And that's with my entire codebase designed to be embarrassingly parallel from the ground up.
I think there's definitely a weakness there. That said, I think this industry tends to shun embarrassingly parallel solutions; equating it to overengineering. Personally, I find embarrassingly parallel solutions more elegant and robust especially in terms of state management. Doesn't require that much additional work. Everyone seems to be on board with Functional Programming which also helps to manage state more reliably (and often helps make code embarrassingly parallel) but my impression is that just aiming for parallelism gives you the same key benefits as FP. Allowing modules to hold state isn't the problem. The problem is that state has to be handled carefully. FP is kind of throwing out the baby with the bathwater, IMO.