Lurker News
We've been hard at work for a few weeks and thought it's time for another update.

In case you missed our first post, PostgresML is an end-to-end machine learning solution, running alongside your favorite database.
This time we have more of a suite offering: project management, visibility into the datasets and the deployment pipeline decision making.
Let us know what you think!
Demo link is on the page, and also here: https://demo.postgresml.org

Comments (70) 31 threads

zmmmmm2 replies#
Seems like a great idea. When you look at many ML frameworks half the code and learning overhead is data schlepping code and table like structures that "reinvent" the schema that already exists inside a database. Not to mention, there can be security concerns from dumping large amounts of data out of the primary store (how are you going to GDPR delete that stuff later on?). So why not use it natively where the data already is?

For anything substantive it seems like a bad idea to run this on your primary store since the last thing you want to do is eat up precious CPU and RAM needed by your OLTP database. But in a data warehouse or similar replicated setup, it seems like a really neat idea.

jiocrag1 reply#
Yeah — seems like all you need is Snowflake-esque separation of storage and compute and bob’s your uncle.
coatue1 reply#
Looks like a good fit to run on Hydras.io (YC W22) the Postgres data warehouse that separates the PG query layer from compute / storage. Disclaimer, I'm the co-founder.
montanalow#
Nice! Feel free to file any issues on Github if something doesn't work. I'd love to understand more about the internals of the hydra architecture.
mr_toad1 reply#
It looks like this is running Python to do the actual ML?

There’s nothing stopping you from reading database table structures directly into memory in Python or R now. You don’t need an intermediate data store.
I agree that running training on production instances would be a bad idea. First, you need to denormalise data for ML, and secondly you typically don’t want your training data to be constantly changing.

montanalow1 reply#
Outside of academia, you need to be able to constantly adapt to changing training data. That is a constant pitfall for many projects that try to transition from offline to online.
mr_toad2 replies#
Outside academia you need to do a lot of data cleaning and feature engineering, and if you’re constantly changing the model as well as the data you’ll never be able to attribute changes to either.

Chances are a DBA wouldn’t consider letting you do data engineering in a live production database anyway, so this really is all academic.

Continue this thread — 2 replies

jdoliner#
This is really cool, running ML workloads on top of SQL is a very practical way of doing ML for a lot of businesses. Many companies don't have the fancy ML workloads like you see at OpenAI, they just have a SQL database with some data that could greatly help their business with some simple ML models trained on it. This looks like a nice way to do it. A slightly different approach that I've been working on involves hooking data warehouses up to Pachyderm [0] so you can do offline training on it. Not as good for online stuff as this, but for longer running batch style jobs it works really well.

[0] http://github.com/pachyderm/pachyderm

phenkdo1 reply#
Can this be used to deploy an "active learning" model that learns from fresh data and model auto-updates?
montanalow1 reply#
That's exactly the target use case. Models make online predictions as part of Postgres queries, and can be periodically retrained in a cadence that makes sense for the particular data set. In my experience the real value of retraining at a fixed cadence is so that you can learn when your data set changes, and have fewer changes to work through when there is some data bug/anomaly introduced into the eco system. Models that aren't routinely retrained tend to die in a catastrophic manner when business logic changes, and their ingestion pipeline hasn't been updated since they were originally created.
streetcat11 reply#
Well, you would also need new labels to retrain.
montanalow#
Yep! Part of the power of being inside the OLTP is that you can just create a VIEW of your training data, which could be anything from customer purchases, search results, whatever, and that VIEW can be re-scanned every time you do the training run to pickup the latest data.
LunaSea2 replies#
Do you plan on adding support for managed PostgreSQL services like RDS in the future?
montanalow2 replies#
We can’t control the extensions RDS allows to be installed, and they are historically conservative. Lev and I do have some fairly extensive experience with replication patterns to Postgres instances running in EC2. Foreign data wrappers are also an option, and depending on workload may be a good horizontal scaling strategy in addition.
michelpp#
Will that also apply to plans? I'd love to see ML models come up with better plans, if possible.
craigkerstiens2 replies#
I just gave it a try to install on Crunchy Bridge [1], disclaimer I work at Crunchy Data. I did this as a standard user vs. anything special about access. I got quite close, but looks like I'm limited by Python version, we give you plpython3u with Python 3.6. Is there any chance of supporting an earlier 3.x version? If so I'm pretty sure could give a guide on how to self-install on top of us.

[1] https://www.crunchydata.com/products/crunchy-bridge/

montanalow#
Awesome. I'll see what it'll take to get the extension running w/ Python 3.6. It's good to know what people's ecosystem dependencies look like.

Load more comments