palimpzest 0.7.8__py3-none-any.whl → 0.7.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- palimpzest/query/optimizer/rules.py +8 -5
- palimpzest/utils/model_helpers.py +9 -1
- {palimpzest-0.7.8.dist-info → palimpzest-0.7.10.dist-info}/METADATA +1 -1
- {palimpzest-0.7.8.dist-info → palimpzest-0.7.10.dist-info}/RECORD +7 -7
- {palimpzest-0.7.8.dist-info → palimpzest-0.7.10.dist-info}/WHEEL +0 -0
- {palimpzest-0.7.8.dist-info → palimpzest-0.7.10.dist-info}/licenses/LICENSE +0 -0
- {palimpzest-0.7.8.dist-info → palimpzest-0.7.10.dist-info}/top_level.txt +0 -0
|
@@ -323,7 +323,8 @@ class LLMConvertBondedRule(ImplementationRule):
|
|
|
323
323
|
first_criteria = model in pure_vision_models and not is_image_conversion
|
|
324
324
|
second_criteria = model in pure_text_models and is_image_conversion
|
|
325
325
|
third_criteria = model.is_llama_model() and model.is_vision_model() and (num_image_fields > 1 or list_image_field)
|
|
326
|
-
|
|
326
|
+
fourth_criteria = model.is_embedding_model()
|
|
327
|
+
if first_criteria or second_criteria or third_criteria or fourth_criteria:
|
|
327
328
|
continue
|
|
328
329
|
|
|
329
330
|
# construct multi-expression
|
|
@@ -470,7 +471,7 @@ class RAGConvertRule(ImplementationRule):
|
|
|
470
471
|
physical_expressions = []
|
|
471
472
|
for model in physical_op_params["available_models"]:
|
|
472
473
|
# skip this model if this is a pure image model
|
|
473
|
-
if model in pure_vision_models:
|
|
474
|
+
if model in pure_vision_models or model.is_embedding_model():
|
|
474
475
|
continue
|
|
475
476
|
|
|
476
477
|
for num_chunks_per_field in cls.num_chunks_per_fields:
|
|
@@ -666,7 +667,8 @@ class CriticAndRefineConvertRule(ImplementationRule):
|
|
|
666
667
|
first_criteria = model in pure_vision_models and not is_image_conversion
|
|
667
668
|
second_criteria = model in pure_text_models and is_image_conversion
|
|
668
669
|
third_criteria = model.is_llama_model() and model.is_vision_model() and (num_image_fields > 1 or list_image_field)
|
|
669
|
-
|
|
670
|
+
fourth_criteria = model.is_embedding_model()
|
|
671
|
+
if first_criteria or second_criteria or third_criteria or fourth_criteria:
|
|
670
672
|
continue
|
|
671
673
|
|
|
672
674
|
models.append(model)
|
|
@@ -746,7 +748,7 @@ class SplitConvertRule(ImplementationRule):
|
|
|
746
748
|
physical_expressions = []
|
|
747
749
|
for model in physical_op_params["available_models"]:
|
|
748
750
|
# skip this model if this is a pure image model
|
|
749
|
-
if model in pure_vision_models:
|
|
751
|
+
if model in pure_vision_models or model.is_embedding_model():
|
|
750
752
|
continue
|
|
751
753
|
|
|
752
754
|
for min_size_to_chunk in cls.min_size_to_chunk:
|
|
@@ -934,7 +936,8 @@ class LLMFilterRule(ImplementationRule):
|
|
|
934
936
|
first_criteria = model in pure_vision_models and not is_image_filter
|
|
935
937
|
second_criteria = model in pure_text_models and is_image_filter
|
|
936
938
|
third_criteria = model.is_llama_model() and model.is_vision_model() and (num_image_fields > 1 or list_image_field)
|
|
937
|
-
|
|
939
|
+
fourth_criteria = model.is_embedding_model()
|
|
940
|
+
if first_criteria or second_criteria or third_criteria or fourth_criteria:
|
|
938
941
|
continue
|
|
939
942
|
|
|
940
943
|
# construct multi-expression
|
|
@@ -25,13 +25,17 @@ def get_vision_models() -> list[Model]:
|
|
|
25
25
|
return models
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
def get_models(include_vision: bool = False) -> list[Model]:
|
|
28
|
+
def get_models(include_vision: bool = False, include_embedding: bool = False) -> list[Model]:
|
|
29
29
|
"""
|
|
30
30
|
Return the set of models which the system has access to based on the set environment variables.
|
|
31
31
|
"""
|
|
32
32
|
models = []
|
|
33
33
|
if os.getenv("OPENAI_API_KEY") is not None:
|
|
34
34
|
openai_models = [model for model in Model if model.is_openai_model()]
|
|
35
|
+
if not include_embedding:
|
|
36
|
+
openai_models = [
|
|
37
|
+
model for model in openai_models if not model.is_embedding_model()
|
|
38
|
+
]
|
|
35
39
|
models.extend(openai_models)
|
|
36
40
|
|
|
37
41
|
if os.getenv("TOGETHER_API_KEY") is not None:
|
|
@@ -40,6 +44,10 @@ def get_models(include_vision: bool = False) -> list[Model]:
|
|
|
40
44
|
together_models = [
|
|
41
45
|
model for model in together_models if not model.is_vision_model()
|
|
42
46
|
]
|
|
47
|
+
if not include_embedding:
|
|
48
|
+
together_models = [
|
|
49
|
+
model for model in together_models if not model.is_embedding_model()
|
|
50
|
+
]
|
|
43
51
|
models.extend(together_models)
|
|
44
52
|
|
|
45
53
|
if include_vision:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: palimpzest
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.10
|
|
4
4
|
Summary: Palimpzest is a system which enables anyone to process AI-powered analytical queries simply by defining them in a declarative language
|
|
5
5
|
Author-email: MIT DSG Semantic Management Lab <michjc@csail.mit.edu>
|
|
6
6
|
Project-URL: homepage, https://palimpzest.org
|
|
@@ -60,7 +60,7 @@ palimpzest/query/optimizer/optimizer_strategy.py,sha256=Aek-LsQQO9VuxI1ZLkmadxik
|
|
|
60
60
|
palimpzest/query/optimizer/optimizer_strategy_type.py,sha256=V-MMHvJdnfZKoUX1xxxwh66q1RjN2FL35IsiT1C62c8,1084
|
|
61
61
|
palimpzest/query/optimizer/plan.py,sha256=i6lOTSNMcVNf0SruMD3lZ_-Nq3_UWq5X6QFd_lRvYA4,5682
|
|
62
62
|
palimpzest/query/optimizer/primitives.py,sha256=r0zjavxxVCCFABXDwdQxRJmQek6WLo1777suoy7CWEc,4038
|
|
63
|
-
palimpzest/query/optimizer/rules.py,sha256=
|
|
63
|
+
palimpzest/query/optimizer/rules.py,sha256=msBWBleUy1sVs1iR67jMf6fPVoRaHsL438pg3nK_hHs,47141
|
|
64
64
|
palimpzest/query/optimizer/tasks.py,sha256=pPDIV-efm_2S9WVYubu0QGuhh5-4c9SM3XtvfhpLDOY,24855
|
|
65
65
|
palimpzest/query/processor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
66
66
|
palimpzest/query/processor/config.py,sha256=dA3GB-nEAIQBllEx4rFy1W8iHYYEZOMOi4MgfZgODuQ,3851
|
|
@@ -84,12 +84,12 @@ palimpzest/utils/env_helpers.py,sha256=n81KzoJ459pRxo7QmJA7duazwWsfoMGTHc71D2Lat
|
|
|
84
84
|
palimpzest/utils/field_helpers.py,sha256=Op18ThAnDlALiAkquUQbelHodZZYg378Ct1I8eIkKio,2291
|
|
85
85
|
palimpzest/utils/generation_helpers.py,sha256=KTeVQDXRwM18auR8YsLNR5AdPDjSgO0NoOBagfFdTMs,3213
|
|
86
86
|
palimpzest/utils/hash_helpers.py,sha256=3A8dA7SbXTwnnvZvPVNqqMLlVRhCKyKF_bjNNAu3Exk,334
|
|
87
|
-
palimpzest/utils/model_helpers.py,sha256=
|
|
87
|
+
palimpzest/utils/model_helpers.py,sha256=GEtWn0SIoTjEf94ZQZyP99zJ2sOEIYJYxhOCjaTcBO0,3433
|
|
88
88
|
palimpzest/utils/progress.py,sha256=RiV753fKV8dFCNan4_wvdN2S3gvTvyRPq4Ksz6nSV1U,18536
|
|
89
89
|
palimpzest/utils/sandbox.py,sha256=Ge96gmzqeOGlNkMCG9A95_PB8wRQbvTFua136of8FcA,6465
|
|
90
90
|
palimpzest/utils/udfs.py,sha256=LjHic54B1az-rKgNLur0wOpaz2ko_UodjLEJrazkxvY,1854
|
|
91
|
-
palimpzest-0.7.
|
|
92
|
-
palimpzest-0.7.
|
|
93
|
-
palimpzest-0.7.
|
|
94
|
-
palimpzest-0.7.
|
|
95
|
-
palimpzest-0.7.
|
|
91
|
+
palimpzest-0.7.10.dist-info/licenses/LICENSE,sha256=5GUlHy9lr-Py9kvV38FF1m3yy3NqM18fefuE9wkWumo,1079
|
|
92
|
+
palimpzest-0.7.10.dist-info/METADATA,sha256=KAELri3j9aRu3CyYypsuJgi-C3DuDjYd10aa4S6lJO8,7231
|
|
93
|
+
palimpzest-0.7.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
94
|
+
palimpzest-0.7.10.dist-info/top_level.txt,sha256=raV06dJUgohefUn3ZyJS2uqp_Y76EOLA9Y2e_fxt8Ew,11
|
|
95
|
+
palimpzest-0.7.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|