corvic-engine 0.3.0rc77__cp38-abi3-win_amd64.whl → 0.3.0rc79__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/eorm/__init__.py +404 -0
- corvic/model/_base_model.py +24 -24
- corvic/model/_completion_model.py +9 -9
- corvic/model/_defaults.py +5 -5
- corvic/model/_feature_view.py +17 -17
- corvic/model/_pipeline.py +12 -12
- corvic/model/_proto_orm_convert.py +102 -100
- corvic/model/_resource.py +24 -24
- corvic/model/_room.py +10 -14
- corvic/model/_source.py +18 -18
- corvic/model/_space.py +21 -21
- corvic/op_graph/_schema.py +3 -3
- corvic/op_graph/feature_types.py +4 -4
- corvic/op_graph/ops.py +2 -2
- corvic/orm/__init__.py +202 -307
- corvic/orm/_soft_delete.py +218 -0
- corvic/orm/ids.py +0 -69
- corvic/system/__init__.py +0 -2
- corvic/system/_embedder.py +2 -2
- corvic/system/in_memory_executor.py +0 -13
- corvic/system/op_graph_executor.py +2 -2
- corvic/system/storage.py +10 -8
- corvic/system_sqlite/client.py +10 -10
- corvic/table/table.py +3 -3
- {corvic_engine-0.3.0rc77.dist-info → corvic_engine-0.3.0rc79.dist-info}/METADATA +1 -1
- {corvic_engine-0.3.0rc77.dist-info → corvic_engine-0.3.0rc79.dist-info}/RECORD +29 -29
- corvic/orm/base.py +0 -256
- corvic/orm/mixins.py +0 -480
- {corvic_engine-0.3.0rc77.dist-info → corvic_engine-0.3.0rc79.dist-info}/WHEEL +0 -0
- {corvic_engine-0.3.0rc77.dist-info → corvic_engine-0.3.0rc79.dist-info}/licenses/LICENSE +0 -0
corvic/model/_feature_view.py
CHANGED
@@ -16,7 +16,7 @@ from more_itertools import flatten
|
|
16
16
|
from sqlalchemy import orm as sa_orm
|
17
17
|
from sqlalchemy.orm.interfaces import LoaderOption
|
18
18
|
|
19
|
-
from corvic import
|
19
|
+
from corvic import eorm, op_graph, system
|
20
20
|
from corvic.model._base_model import BelongsToRoomModel, UsesOrmID
|
21
21
|
from corvic.model._defaults import Defaults
|
22
22
|
from corvic.model._proto_orm_convert import (
|
@@ -37,9 +37,9 @@ from corvic.table import (
|
|
37
37
|
from corvic_generated.model.v1alpha import models_pb2
|
38
38
|
from corvic_generated.orm.v1 import feature_view_pb2
|
39
39
|
|
40
|
-
FeatureViewID: TypeAlias =
|
41
|
-
FeatureViewSourceID: TypeAlias =
|
42
|
-
RoomID: TypeAlias =
|
40
|
+
FeatureViewID: TypeAlias = eorm.FeatureViewID
|
41
|
+
FeatureViewSourceID: TypeAlias = eorm.FeatureViewSourceID
|
42
|
+
RoomID: TypeAlias = eorm.RoomID
|
43
43
|
|
44
44
|
|
45
45
|
def _validate_deepgnn_nodes(
|
@@ -553,7 +553,7 @@ class FeatureViewSource(UsesOrmID[FeatureViewSourceID, models_pb2.FeatureViewSou
|
|
553
553
|
source: Source,
|
554
554
|
*,
|
555
555
|
drop_disconnected: bool,
|
556
|
-
room_id:
|
556
|
+
room_id: eorm.RoomID,
|
557
557
|
):
|
558
558
|
return cls(
|
559
559
|
source.client,
|
@@ -642,7 +642,7 @@ class DeepGnnCsvUrlMetadata(DataclassAsTypedMetadataMixin):
|
|
642
642
|
|
643
643
|
|
644
644
|
class FeatureView(
|
645
|
-
BelongsToRoomModel[FeatureViewID, models_pb2.FeatureView,
|
645
|
+
BelongsToRoomModel[FeatureViewID, models_pb2.FeatureView, eorm.FeatureView]
|
646
646
|
):
|
647
647
|
"""FeatureViews describe how Sources should be modeled to create a feature space.
|
648
648
|
|
@@ -662,25 +662,25 @@ class FeatureView(
|
|
662
662
|
|
663
663
|
@classmethod
|
664
664
|
def orm_class(cls):
|
665
|
-
return
|
665
|
+
return eorm.FeatureView
|
666
666
|
|
667
667
|
@classmethod
|
668
668
|
def id_class(cls):
|
669
669
|
return FeatureViewID
|
670
670
|
|
671
671
|
@classmethod
|
672
|
-
def orm_to_proto(cls, orm_obj:
|
672
|
+
def orm_to_proto(cls, orm_obj: eorm.FeatureView) -> models_pb2.FeatureView:
|
673
673
|
return feature_view_orm_to_proto(orm_obj)
|
674
674
|
|
675
675
|
@classmethod
|
676
676
|
def proto_to_orm(
|
677
|
-
cls, proto_obj: models_pb2.FeatureView, session:
|
678
|
-
) -> Ok[
|
677
|
+
cls, proto_obj: models_pb2.FeatureView, session: eorm.Session
|
678
|
+
) -> Ok[eorm.FeatureView] | InvalidArgumentError:
|
679
679
|
return feature_view_proto_to_orm(proto_obj, session)
|
680
680
|
|
681
681
|
@classmethod
|
682
682
|
def delete_by_ids(
|
683
|
-
cls, ids: Sequence[FeatureViewID], session:
|
683
|
+
cls, ids: Sequence[FeatureViewID], session: eorm.Session
|
684
684
|
) -> Ok[None] | InvalidArgumentError:
|
685
685
|
return feature_view_delete_orms(ids, session)
|
686
686
|
|
@@ -706,10 +706,10 @@ class FeatureView(
|
|
706
706
|
@classmethod
|
707
707
|
def orm_load_options(cls) -> list[LoaderOption]:
|
708
708
|
return [
|
709
|
-
sa_orm.selectinload(
|
710
|
-
.selectinload(
|
711
|
-
.selectinload(
|
712
|
-
.selectinload(
|
709
|
+
sa_orm.selectinload(eorm.FeatureView.feature_view_sources)
|
710
|
+
.selectinload(eorm.FeatureViewSource.source)
|
711
|
+
.selectinload(eorm.Source.pipeline_ref)
|
712
|
+
.selectinload(eorm.PipelineOutput.source)
|
713
713
|
]
|
714
714
|
|
715
715
|
@classmethod
|
@@ -958,7 +958,7 @@ class FeatureView(
|
|
958
958
|
node_type = -1
|
959
959
|
for node_id, node_table in node_tables.items():
|
960
960
|
match node_id.to_db():
|
961
|
-
case
|
961
|
+
case eorm.InvalidORMIdentifierError():
|
962
962
|
node_type += 1
|
963
963
|
case Ok(db_id):
|
964
964
|
node_type = db_id
|
@@ -992,7 +992,7 @@ class FeatureView(
|
|
992
992
|
|
993
993
|
@classmethod
|
994
994
|
def create(
|
995
|
-
cls, client: system.Client | None = None, room_id:
|
995
|
+
cls, client: system.Client | None = None, room_id: eorm.RoomID | None = None
|
996
996
|
) -> FeatureView:
|
997
997
|
"""Create a FeatureView."""
|
998
998
|
client = client or Defaults.get_default_client()
|
corvic/model/_pipeline.py
CHANGED
@@ -13,7 +13,7 @@ from sqlalchemy import orm as sa_orm
|
|
13
13
|
from sqlalchemy.orm.interfaces import LoaderOption
|
14
14
|
|
15
15
|
import corvic.table
|
16
|
-
from corvic import
|
16
|
+
from corvic import eorm, op_graph, system
|
17
17
|
from corvic.model._base_model import BelongsToRoomModel
|
18
18
|
from corvic.model._defaults import Defaults
|
19
19
|
from corvic.model._proto_orm_convert import (
|
@@ -26,34 +26,34 @@ from corvic.result import InvalidArgumentError, NotFoundError, Ok, UnavailableEr
|
|
26
26
|
from corvic_generated.model.v1alpha import models_pb2
|
27
27
|
from corvic_generated.orm.v1 import pipeline_pb2
|
28
28
|
|
29
|
-
PipelineID: TypeAlias =
|
30
|
-
RoomID: TypeAlias =
|
29
|
+
PipelineID: TypeAlias = eorm.PipelineID
|
30
|
+
RoomID: TypeAlias = eorm.RoomID
|
31
31
|
|
32
32
|
|
33
|
-
class Pipeline(BelongsToRoomModel[PipelineID, models_pb2.Pipeline,
|
33
|
+
class Pipeline(BelongsToRoomModel[PipelineID, models_pb2.Pipeline, eorm.Pipeline]):
|
34
34
|
"""Pipelines map resources to sources."""
|
35
35
|
|
36
36
|
@classmethod
|
37
37
|
def orm_class(cls):
|
38
|
-
return
|
38
|
+
return eorm.Pipeline
|
39
39
|
|
40
40
|
@classmethod
|
41
41
|
def id_class(cls):
|
42
42
|
return PipelineID
|
43
43
|
|
44
44
|
@classmethod
|
45
|
-
def orm_to_proto(cls, orm_obj:
|
45
|
+
def orm_to_proto(cls, orm_obj: eorm.Pipeline) -> models_pb2.Pipeline:
|
46
46
|
return pipeline_orm_to_proto(orm_obj)
|
47
47
|
|
48
48
|
@classmethod
|
49
49
|
def proto_to_orm(
|
50
|
-
cls, proto_obj: models_pb2.Pipeline, session:
|
51
|
-
) -> Ok[
|
50
|
+
cls, proto_obj: models_pb2.Pipeline, session: eorm.Session
|
51
|
+
) -> Ok[eorm.Pipeline] | InvalidArgumentError:
|
52
52
|
return pipeline_proto_to_orm(proto_obj, session)
|
53
53
|
|
54
54
|
@classmethod
|
55
55
|
def delete_by_ids(
|
56
|
-
cls, ids: Sequence[PipelineID], session:
|
56
|
+
cls, ids: Sequence[PipelineID], session: eorm.Session
|
57
57
|
) -> Ok[None] | InvalidArgumentError:
|
58
58
|
return pipeline_delete_orms(ids, session)
|
59
59
|
|
@@ -120,9 +120,9 @@ class Pipeline(BelongsToRoomModel[PipelineID, models_pb2.Pipeline, orm.Pipeline]
|
|
120
120
|
@classmethod
|
121
121
|
def orm_load_options(cls) -> list[LoaderOption]:
|
122
122
|
return [
|
123
|
-
sa_orm.selectinload(
|
124
|
-
.selectinload(
|
125
|
-
.selectinload(
|
123
|
+
sa_orm.selectinload(eorm.Pipeline.outputs)
|
124
|
+
.selectinload(eorm.PipelineOutput.source)
|
125
|
+
.selectinload(eorm.Source.pipeline_ref),
|
126
126
|
]
|
127
127
|
|
128
128
|
@classmethod
|