Skip to content

Commit 470f2d3

Browse files
committed
move embedding tests into their own file
1 parent 455861e commit 470f2d3

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

pgml-extension/examples/embedding.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
\timing on
2+
3+
SELECT pgml.embed('Alibaba-NLP/gte-base-en-v1.5', 'hi mom', '{"trust_remote_code": true}');
4+
SELECT pgml.embed('Alibaba-NLP/gte-base-en-v1.5', 'hi mom', '{"device": "cuda", "trust_remote_code": true}');
5+
SELECT pgml.embed('Alibaba-NLP/gte-base-en-v1.5', 'hi mom', '{"device": "cpu", "trust_remote_code": true}');
6+
SELECT pgml.embed('hkunlp/instructor-xl', 'hi mom', '{"instruction": "Encode it with love"}');
7+
SELECT pgml.embed('mixedbread-ai/mxbai-embed-large-v1', 'test', '{"prompt": "test prompt: "}');

pgml-extension/examples/image_classification.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ SELECT * FROM pgml.train('Handwritten Digits', algorithm => 'xgboost', hyperpara
6666

6767
-- runtimes
6868
SELECT * FROM pgml.train('Handwritten Digits', algorithm => 'linear', runtime => 'python');
69-
SELECT * FROM pgml.train('Handwritten Digits', algorithm => 'linear', runtime => 'rust');
69+
--SELECT * FROM pgml.train('Handwritten Digits', algorithm => 'linear', runtime => 'rust');
7070

7171
--SELECT * FROM pgml.train('Handwritten Digits', algorithm => 'xgboost', runtime => 'python', hyperparams => '{"n_estimators": 10}'); -- too slow
7272
SELECT * FROM pgml.train('Handwritten Digits', algorithm => 'xgboost', runtime => 'rust', hyperparams => '{"n_estimators": 10}');

pgml-extension/examples/transformers.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ SELECT pgml.transform_stream(
1818
}'::JSONB,
1919
input => 'AI is going to',
2020
args => '{
21-
"max_new_tokens": 100
21+
"max_new_tokens": 100,
22+
"token": "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"
2223
}'::JSONB
2324
);
2425
-- BitsAndBytes support

pgml-extension/tests/test.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ SELECT pgml.load_dataset('wine');
3131
\i examples/vectors.sql
3232
\i examples/chunking.sql
3333
\i examples/preprocessing.sql
34+
\i examples/embedding.sql
3435
-- transformers are generally too slow to run in the test suite
3536
--\i examples/transformers.sql

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy