Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adding embed_array for getting the embeddings of multiple strings#686

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
montanalow merged 15 commits intopostgresml:masterfromjsaied99:embeddings_inputs
Jun 5, 2023
Merged
Changes from1 commit
Commits
Show all changes
15 commits
Select commitHold shift + click to select a range
be7052e
working postgres
jsaied99Jun 5, 2023
2d949fb
Fixing Dockerfile.local for local deployment
jsaied99Jun 5, 2023
1ebfd01
removing command from compose
jsaied99Jun 5, 2023
b20ed8d
adding inputs as an array for embeddings
jsaied99Jun 5, 2023
e0738dc
fixing function overloading issue
jsaied99Jun 5, 2023
f614404
adding vec<vec>
jsaied99Jun 5, 2023
9425b63
handling inputs
jsaied99Jun 5, 2023
039da67
handling inputs loads instead of dumps
jsaied99Jun 5, 2023
03abdcd
fixing instance of json
jsaied99Jun 5, 2023
c5f7798
Merge branch 'master' into embeddings_inputs
jsaied99Jun 5, 2023
6ffabc9
adding name so same funciton name
jsaied99Jun 5, 2023
0b0e666
Changing inner func name to embed_batch
jsaied99Jun 5, 2023
4b2e14d
adding fixes from comments
jsaied99Jun 5, 2023
78bda85
adding Vec<Vec<f32>>
jsaied99Jun 5, 2023
9111a49
fixing compilation errors
jsaied99Jun 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
fixing instance of json
  • Loading branch information
@jsaied99
jsaied99 committedJun 5, 2023
commit03abdcd8001c77173f58020cd5dcc37b84fed299
4 changes: 3 additions & 1 deletionpgml-extension/src/bindings/transformers.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -112,8 +112,10 @@ def transform(task, args, inputs):

def embed(transformer, inputs, kwargs):

if not isinstance(inputs, str):
try:
inputs = json.loads(inputs)
except json.decoder.JSONDecodeError:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What is the known case that this is handling?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Without passing any extra arguments, I couldn't think of a way of knowing wether inputs was a string or a JSON string. Thought the simplest way was trying to convert it into a python object.

pass

kwargs = json.loads(kwargs)
ensure_device(kwargs)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp