|
1 | 1 | import os |
2 | 2 | import re |
3 | 3 | import sqlite3 |
| 4 | +import sys |
4 | 5 | import tempfile |
5 | 6 | import unittest |
6 | 7 | from datetime import datetime, timedelta |
@@ -1271,21 +1272,22 @@ def python_stored_writes_feature_view_explode_singleton( |
1271 | 1272 | "chunk_text": ["how are you?", "This is a test."], |
1272 | 1273 | } |
1273 | 1274 |
|
1274 | | - query_embedding = [0.05] * 5 |
1275 | | - online_python_vec_response = self.store.retrieve_online_documents_v2( |
1276 | | - features=[ |
1277 | | - "python_stored_writes_feature_view_explode_singleton:document_id", |
1278 | | - "python_stored_writes_feature_view_explode_singleton:chunk_id", |
1279 | | - "python_stored_writes_feature_view_explode_singleton:chunk_text", |
1280 | | - ], |
1281 | | - query=query_embedding, |
1282 | | - top_k=2, |
1283 | | - ).to_dict() |
1284 | | - |
1285 | | - assert online_python_vec_response is not None |
1286 | | - assert online_python_vec_response == { |
1287 | | - "document_id": ["doc_1", "doc_1"], |
1288 | | - "chunk_id": ["chunk-1", "chunk-2"], |
1289 | | - "chunk_text": ["hello friends", "how are you?"], |
1290 | | - "distance": [0.11180340498685837, 0.3354102075099945], |
1291 | | - } |
| 1275 | + if sys.version_info[0:2] == (3, 10): |
| 1276 | + query_embedding = [0.05] * 5 |
| 1277 | + online_python_vec_response = self.store.retrieve_online_documents_v2( |
| 1278 | + features=[ |
| 1279 | + "python_stored_writes_feature_view_explode_singleton:document_id", |
| 1280 | + "python_stored_writes_feature_view_explode_singleton:chunk_id", |
| 1281 | + "python_stored_writes_feature_view_explode_singleton:chunk_text", |
| 1282 | + ], |
| 1283 | + query=query_embedding, |
| 1284 | + top_k=2, |
| 1285 | + ).to_dict() |
| 1286 | + |
| 1287 | + assert online_python_vec_response is not None |
| 1288 | + assert online_python_vec_response == { |
| 1289 | + "document_id": ["doc_1", "doc_1"], |
| 1290 | + "chunk_id": ["chunk-1", "chunk-2"], |
| 1291 | + "chunk_text": ["hello friends", "how are you?"], |
| 1292 | + "distance": [0.11180340498685837, 0.3354102075099945], |
| 1293 | + } |
0 commit comments