This looks awesome! I’m not an expert but wouldn’t the typical database hardware not be really optimal for running ML? Is this meant to run on a replica (which is quite straightforward to setup) that has ML optimised hardware?
Maybe enhance this with a FDW to an external inference process to allow triggering of inference from Postgresql itself.