Skip to content

Commit 208b11a

Browse files
committed
Improved examples[skip ci]
1 parent bef31a8 commit 208b11a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/colbert/approximate.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
import psycopg
77
import warnings
88

9-
# ignore warnings from colbert
10-
warnings.filterwarnings('ignore')
11-
129
conn = psycopg.connect(dbname='pgvector_example', autocommit=True)
1310

1411
conn.execute('CREATE EXTENSION IF NOT EXISTS vector')
@@ -38,6 +35,9 @@
3835
$$ LANGUAGE SQL
3936
""")
4037

38+
# ignore warnings from colbert
39+
warnings.filterwarnings('ignore')
40+
4141
config = ColBERTConfig(doc_maxlen=220, query_maxlen=32)
4242
checkpoint = Checkpoint('colbert-ir/colbertv2.0', colbert_config=config, verbose=0)
4343

examples/colbert/exact.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
import psycopg
55
import warnings
66

7-
# ignore warnings from colbert
8-
warnings.filterwarnings('ignore')
9-
107
conn = psycopg.connect(dbname='pgvector_example', autocommit=True)
118

129
conn.execute('CREATE EXTENSION IF NOT EXISTS vector')
@@ -32,6 +29,9 @@
3229
$$ LANGUAGE SQL
3330
""")
3431

32+
# ignore warnings from colbert
33+
warnings.filterwarnings('ignore')
34+
3535
config = ColBERTConfig(doc_maxlen=220, query_maxlen=32)
3636
checkpoint = Checkpoint('colbert-ir/colbertv2.0', colbert_config=config, verbose=0)
3737

0 commit comments

Comments
 (0)