Comments (2)
I agree, it'd be great if PostgresML could run in a Python virtual environment, distinct from the OS Python. Unfortunately, Postgres doesn't currently provide a mechanism for individual Python extensions to specify a Python runtime, although the version of Python used can be configured at build time for Postgres.
There are a few ways we could avoid dependency on the OS system Python (listed in my order of preference):
- Implement venv (or similar) support in Postgres core.
- Reimplement PostgresML as a C (abi compatible) extension independent of Python.
- Package PostgresML as a Python process running in a container, and have a non Python extension call out to it.
Option 1 is great, because all Postgres extensions would benefit not just PostgresML, but I think this is a Postgres issue, not a PostgresML issue.
Option 2 is something we're considering, but the primary motivation will be around resource usage from real world benchmarks. I think we'll likely do this one feature or bottleneck at a time on a case by case basis if and when it makes sense. Completely removing all Python dependency from the extension would be more of a rewrite or port, which I'm not keen to commit to all at once.
Option 3 seems like something we'd consider if the ML
part of PostgresML became significantly more important than the Postgres
part, and we wanted a cleaner separation. Currently, I think Postgres is an integral part of PostgresML, and will be for the foreseeable future, so this is not something we're pursuing.
I'm going to close this issue, because we have no immediate plan to start working toward it's resolution, but would appreciate continued discussion if the community has additional thoughts.
from postgresml.
I don't think you addressed my proposal as I intended to convey it.
This project already does more or less what is necessary, via ./pgml-extension/tests/plpy.py,
for testing.
What you would have is a variant that would have some module state to be able to connect to a postgres instance and adapt any result sets so the plpy and, say, psychopg2 (or whatever) result sets had the same interface.
As far as I can tell, the extension as such is limited to fairly simple queries and result sets, making both my proposal, and the testing methodology, feasible.
from postgresml.
Related Issues (20)
- Documentation never states the extension name HOT 2
- After using pgml.dump_all and pgml.load_all for data backup and migration, an error occurs when trying to train on the new database.
- Error occurs during pgml.train with passive_aggressive algorithm
- rust-xgboost doesn't build on Mac OS HOT 1
- Improvement Suggestion for predictor_proba Function in sklearn.py HOT 1
- pgml.train does not properly escape relation_name HOT 2
- pgvector missing in Docker image ghcr.io/postgresml/postgresml:2.8.2 HOT 2
- wrong SQL SELECT in readme
- wrong SQL CREATE INDEX in readme
- Error in "pgml.transform" with "text2text-generation" and "bigscience/T0" HOT 2
- Docker build process fails because postgresml version 2.7.13 is no longer found at apt.postgresml.org HOT 2
- Question answering on a table HOT 1
- Support for `mixedbread-ai/mxbai-embed-large-v1`
- Split transformers.py into multiple python files HOT 1
- Potential performance issue: Unreliable performance of .loc in pandas 2.0.3
- Issues with Docker container on port 5432
- Transaction leak in transform_stream
- OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like google-t5/t5-base is not the path to a HOT 6
- How to build on an existing PostgreSQL server HOT 1
- Code blocks can't be rendered in tabs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postgresml.