corvic-engine 0.3.0rc66__cp38-abi3-win_amd64.whl → 0.3.0rc68__cp38-abi3-win_amd64.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.
- corvic/engine/_native.pyd +0 -0
- corvic/model/_base_model.py +3 -4
- corvic/model/_completion_model.py +2 -4
- corvic/model/_feature_view.py +5 -6
- corvic/model/_pipeline.py +1 -2
- corvic/model/_resource.py +1 -2
- corvic/model/_source.py +1 -2
- corvic/model/_space.py +1 -2
- corvic/orm/base.py +4 -5
- corvic/orm/ids.py +1 -2
- corvic/orm/mixins.py +18 -9
- corvic/pa_scalar/_temporal.py +1 -1
- corvic/result/__init__.py +1 -2
- corvic/sql/parse_ops.py +5 -1
- corvic/system/_column_encoding.py +215 -0
- corvic/system/_embedder.py +24 -2
- corvic/system/_image_embedder.py +38 -0
- corvic/system/_planner.py +6 -3
- corvic/system/_text_embedder.py +21 -0
- corvic/system/client.py +2 -1
- corvic/system/in_memory_executor.py +503 -507
- corvic/system/op_graph_executor.py +7 -3
- corvic/system/storage.py +1 -3
- corvic/table/table.py +5 -5
- {corvic_engine-0.3.0rc66.dist-info → corvic_engine-0.3.0rc68.dist-info}/METADATA +3 -4
- {corvic_engine-0.3.0rc66.dist-info → corvic_engine-0.3.0rc68.dist-info}/RECORD +28 -27
- {corvic_engine-0.3.0rc66.dist-info → corvic_engine-0.3.0rc68.dist-info}/WHEEL +0 -0
- {corvic_engine-0.3.0rc66.dist-info → corvic_engine-0.3.0rc68.dist-info}/licenses/LICENSE +0 -0
corvic/system/_text_embedder.py
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
import asyncio
|
2
|
+
from concurrent.futures import ThreadPoolExecutor
|
3
|
+
|
1
4
|
import numpy as np
|
2
5
|
import polars as pl
|
3
6
|
|
@@ -40,6 +43,15 @@ class RandomTextEmbedder(TextEmbedder):
|
|
40
43
|
)
|
41
44
|
)
|
42
45
|
|
46
|
+
async def aembed(
|
47
|
+
self,
|
48
|
+
context: EmbedTextContext,
|
49
|
+
worker_threads: ThreadPoolExecutor | None = None,
|
50
|
+
) -> Ok[EmbedTextResult] | InvalidArgumentError | InternalError:
|
51
|
+
return await asyncio.get_running_loop().run_in_executor(
|
52
|
+
worker_threads, self.embed, context
|
53
|
+
)
|
54
|
+
|
43
55
|
|
44
56
|
class IdentityTextEmbedder(TextEmbedder):
|
45
57
|
"""A deterministic text embedder.
|
@@ -90,6 +102,15 @@ class IdentityTextEmbedder(TextEmbedder):
|
|
90
102
|
)
|
91
103
|
)
|
92
104
|
|
105
|
+
async def aembed(
|
106
|
+
self,
|
107
|
+
context: EmbedTextContext,
|
108
|
+
worker_threads: ThreadPoolExecutor | None = None,
|
109
|
+
) -> Ok[EmbedTextResult] | InvalidArgumentError | InternalError:
|
110
|
+
return await asyncio.get_running_loop().run_in_executor(
|
111
|
+
worker_threads, self.embed, context
|
112
|
+
)
|
113
|
+
|
93
114
|
def preimage(self, embedding: list[float], *, normalized: bool = False) -> str:
|
94
115
|
"""Reconstruct the text from a given embedding vector."""
|
95
116
|
if normalized:
|
corvic/system/client.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
"""Corvic system client protocol."""
|
2
2
|
|
3
|
+
from typing import Protocol
|
4
|
+
|
3
5
|
import sqlalchemy as sa
|
4
|
-
from typing_extensions import Protocol
|
5
6
|
|
6
7
|
from corvic.system._embedder import ImageEmbedder, TextEmbedder
|
7
8
|
from corvic.system.op_graph_executor import OpGraphExecutor
|