-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lei/hack202205 #10
base: main
Are you sure you want to change the base?
Lei/hack202205 #10
Conversation
7f017e0
to
aaff37c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine overall, a bunch of nits/questions
@@ -0,0 +1,18 @@ | |||
FROM postgres:14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to copy this to Sophon as well so docker-compose spins up a rikai-pg enabled postgres?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, we will build a docker image for services.
@@ -1,9 +1,9 @@ | |||
FROM postgres:14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we consolidate this vs the .github/Dockerfile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was a plan to have a playground
docker released to docker registry. And another docker for CI.
|
||
|
||
class PgModel: | ||
"""PostgreSQL Model""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think too many things are called "model" now. e.g.:
- we the actual pytorch/tf "model"
- we have the Rikai ModelType which gets assigned to
self.model
- And this PgModel is also a "model"
This is probably worth a separate discussion tho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, thats true. This is more about a model adaptor
def schema(self) -> str: | ||
return self.model.schema() | ||
|
||
def args(self) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't quite understand what this does, but maybe it'll become clear later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was about building the arg list for the PG UDF.
rikai/experimental/pg/model.py
Outdated
|
||
def __repr__(self): | ||
return f"PgModel({self.model})" | ||
return f"PGModel(model={self.model})" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PgModel vs PGModel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
-- Test data | ||
-- See images in rikai/tests/conftest.py | ||
CREATE EXTENSION IF NOT EXISTS pgtap; -- For unit test | ||
INSERT INTO ml.models (name, flavor, model_type, uri, options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe add a description column?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point
May hackathon for experimental embedding search