Live data from Hacker News

Show HN: PostgresML, now with analytics and project management

postgresml.org

31–40 of 76 posts

Re: Show HN: PostgresML, now with analytics and project management

#33
post #4
post #2

What affiliation does this have with PostgreSQL?

None, it's just an extension. Which is part of what is so awesome about PostgreSQL, everyone can build extensions that look and feel native and can do almost anything.

This logo and name, to me at least, implied some sort of official affiliation with the PostgreSQL project. Which I think should at least be clarified on the site/readme.

Re: Show HN: PostgresML, now with analytics and project management

#35
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

Re: Show HN: PostgresML, now with analytics and project management

#36

Can we offload model train to a different server? It can be parallelized? Anyway, nice API and a promising project.

This can be done "manually" by configuring Postgres replication and/or foreign data wrappers. We don't have a magic button for that, but if we have a few examples in the wild we can establish best practices and then put those into code. I say this with some optimism that we may be able to see more targeted ML specific scalability use cases that can be solved more completely than general database scalability.

Re: Show HN: PostgresML, now with analytics and project management

#37
post #3

Can this be used to deploy an "active learning" model that learns from fresh data and model auto-updates?

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…

Well, you would also need new labels to retrain.

Re: Show HN: PostgresML, now with analytics and project management

#38

Earlier quoted context omitted.

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…

Well, you would also need new labels to retrain.

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.

Re: Show HN: PostgresML, now with analytics and project management

#39
post #21

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?

It’s probably a stretch to run GPT-3 inside a db, but most of the “deep learning” models I’ve run in more traditional environments are a few megabytes. That’s millions of params, but Morre’s law has been generous enough to us over the decades that I think there is a good case to spend a few megabytes of DB ram on ML. I would think this idea has really landed though, when we start hearing about Postgres deployments wi…

You can already do that by using the pl/python or pl/java extensions with the right environment. However, the interface between SQL and model inference is typically narrow enough that IMO it's better to: read from Postgres --> process in an external Python/Java process --> persist to Postgres.

Maybe enhance this with a FDW to an external inference process to allow triggering of inference from Postgresql itself.

Re: Show HN: PostgresML, now with analytics and project management

#40
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.

Post reply on HN