projectdavid-orm 1.1.12__tar.gz → 1.3.0__tar.gz

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.
Files changed (26) hide show
  1. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/CHANGELOG.md +14 -0
  2. {projectdavid_orm-1.1.12/src/projectdavid_orm.egg-info → projectdavid_orm-1.3.0}/PKG-INFO +2 -2
  3. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/pyproject.toml +2 -2
  4. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_orm/projectdavid_orm/models.py +29 -15
  5. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0/src/projectdavid_orm.egg-info}/PKG-INFO +2 -2
  6. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/LICENSE +0 -0
  7. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/MANIFEST.in +0 -0
  8. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/README.md +0 -0
  9. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/setup.cfg +0 -0
  10. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_common.egg-info/PKG-INFO +0 -0
  11. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_common.egg-info/SOURCES.txt +0 -0
  12. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_common.egg-info/dependency_links.txt +0 -0
  13. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_common.egg-info/entry_points.txt +0 -0
  14. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_common.egg-info/requires.txt +0 -0
  15. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_common.egg-info/top_level.txt +0 -0
  16. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_orm/__init__.py +0 -0
  17. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_orm/constants/__init__.py +0 -0
  18. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_orm/ormInterface.py +0 -0
  19. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_orm/projectdavid_orm/__init__.py +0 -0
  20. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_orm/projectdavid_orm/base.py +0 -0
  21. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_orm/utilities/__init__.py +0 -0
  22. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_orm.egg-info/SOURCES.txt +0 -0
  23. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_orm.egg-info/dependency_links.txt +0 -0
  24. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_orm.egg-info/requires.txt +0 -0
  25. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/src/projectdavid_orm.egg-info/top_level.txt +0 -0
  26. {projectdavid_orm-1.1.12 → projectdavid_orm-1.3.0}/tests/test_clients.py +0 -0
@@ -1,3 +1,17 @@
1
+ # [1.3.0](https://github.com/project-david-ai/projectdavid-orm/compare/v1.2.0...v1.3.0) (2026-03-23)
2
+
3
+
4
+ ### Features
5
+
6
+ * Phase 4 ([235a547](https://github.com/project-david-ai/projectdavid-orm/commit/235a54724dee1555c6e23febc9dec5d85dda5328))
7
+
8
+ # [1.2.0](https://github.com/project-david-ai/projectdavid-orm/compare/v1.1.12...v1.2.0) (2026-03-22)
9
+
10
+
11
+ ### Features
12
+
13
+ * add internal_hostname to InferenceDeployment ([20aa5d2](https://github.com/project-david-ai/projectdavid-orm/commit/20aa5d23fae57e510b63bcb59b24ff0c1544be9b))
14
+
1
15
  ## [1.1.12](https://github.com/project-david-ai/projectdavid-orm/compare/v1.1.11...v1.1.12) (2026-03-21)
2
16
 
3
17
 
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: projectdavid-orm
3
- Version: 1.1.12
3
+ Version: 1.3.0
4
4
  Summary: Shared SQLAlchemy ORM models for ProjectDavid services
5
5
  Author-email: "Francis N." <francis.neequaye@projectdavid.co.uk>
6
6
  License: Polyform
7
- Project-URL: Homepage, https://github.com/frankie336/projectdavid-orm
7
+ Project-URL: Homepage, https://github.com/project-david-ai/projectdavid-orm
8
8
  Keywords: orm,sqlalchemy,models,projectdavid,internal
9
9
  Requires-Python: >=3.10
10
10
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "projectdavid-orm"
7
- version = "1.1.12"
7
+ version = "1.3.0"
8
8
  description = "Shared SQLAlchemy ORM models for ProjectDavid services"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -30,7 +30,7 @@ dev = [
30
30
  ]
31
31
 
32
32
  [project.urls]
33
- Homepage = "https://github.com/frankie336/projectdavid-orm"
33
+ Homepage = "https://github.com/project-david-ai/projectdavid-orm"
34
34
 
35
35
  [tool.setuptools]
36
36
  package-dir = { "" = "src" }
@@ -762,8 +762,6 @@ class VectorStoreFile(Base):
762
762
  # ---------------------------------------------------------------------------
763
763
  # Training API Models
764
764
  # ---------------------------------------------------------------------------
765
-
766
-
767
765
  class Dataset(Base):
768
766
  __tablename__ = "datasets"
769
767
  id = Column(String(64), primary_key=True, index=True)
@@ -822,7 +820,9 @@ class TrainingJob(Base):
822
820
  metrics = Column(JSON, nullable=True)
823
821
  output_path = Column(String(512), nullable=True)
824
822
 
825
- # NEW: Link to Cluster
823
+ # Phase 4: node_id stores the Ray node ID (hex string) for traceability.
824
+ # FK to compute_nodes retained for legacy compatibility — will be dropped
825
+ # in Phase 5 when compute_nodes table is removed entirely.
826
826
  node_id = Column(String(64), ForeignKey("compute_nodes.id", ondelete="SET NULL"), nullable=True)
827
827
 
828
828
  dataset = relationship("Dataset", back_populates="training_jobs", lazy="select")
@@ -864,7 +864,8 @@ class FineTunedModel(Base):
864
864
  )
865
865
  deleted_at = Column(Integer, nullable=True, default=None, index=True)
866
866
 
867
- # NEW: Link to Cluster (Last known serving node)
867
+ # Phase 4: stores Ray node ID for traceability. FK retained for legacy
868
+ # compatibility until Phase 5 drops compute_nodes.
868
869
  node_id = Column(String(64), ForeignKey("compute_nodes.id", ondelete="SET NULL"), nullable=True)
869
870
 
870
871
  training_job = relationship("TrainingJob", back_populates="fine_tuned_model", lazy="select")
@@ -872,30 +873,42 @@ class FineTunedModel(Base):
872
873
 
873
874
 
874
875
  # ---------------------------------------------------------------------------
875
- # Cluster & Resource Management
876
+ # Cluster & Resource Management (Legacy — Phase 5 will drop these)
876
877
  # ---------------------------------------------------------------------------
877
878
 
878
879
 
879
880
  class ComputeNode(Base):
881
+ """
882
+ Phase 4 status: LEGACY.
883
+ Node registration and heartbeat are now handled by Ray natively.
884
+ This table is retained for FK compatibility with TrainingJob and
885
+ FineTunedModel. Will be dropped in Phase 5 cleanup.
886
+ """
887
+
880
888
  __tablename__ = "compute_nodes"
881
889
  id = Column(String(64), primary_key=True, index=True)
882
890
  hostname = Column(String(128), nullable=False)
883
891
  ip_address = Column(String(45), nullable=True)
884
-
885
892
  gpu_model = Column(String(128))
886
893
  total_vram_gb = Column(Float)
887
894
  current_vram_usage_gb = Column(Float, default=0.0)
888
895
  status = Column(SAEnum(StatusEnum), default=StatusEnum.active)
889
896
  last_heartbeat = Column(BigInteger, default=lambda: int(time.time()))
890
897
 
891
- # Enhanced Relationships
892
898
  allocations = relationship("GPUAllocation", back_populates="node", cascade="all, delete-orphan")
893
899
  training_jobs = relationship("TrainingJob", back_populates="node")
894
900
  active_models = relationship("FineTunedModel", back_populates="node")
895
- deployments = relationship("InferenceDeployment", back_populates="node")
901
+ # Phase 4: InferenceDeployment no longer has a FK back to compute_nodes
902
+ # so the deployments relationship is removed from this side too.
896
903
 
897
904
 
898
905
  class GPUAllocation(Base):
906
+ """
907
+ Phase 4 status: LEGACY.
908
+ VRAM reservation is now handled by Ray resource scheduling.
909
+ Table retained for schema compatibility. Will be dropped in Phase 5.
910
+ """
911
+
899
912
  __tablename__ = "gpu_allocations"
900
913
  id = Column(Integer, primary_key=True, autoincrement=True)
901
914
  node_id = Column(String(64), ForeignKey("compute_nodes.id", ondelete="CASCADE"))
@@ -903,7 +916,6 @@ class GPUAllocation(Base):
903
916
  model_id = Column(
904
917
  String(64), ForeignKey("fine_tuned_models.id", ondelete="CASCADE"), nullable=True
905
918
  )
906
-
907
919
  vram_reserved_gb = Column(Float, nullable=False)
908
920
  created_at = Column(BigInteger, default=lambda: int(time.time()))
909
921
 
@@ -928,18 +940,20 @@ class BaseModel(Base):
928
940
  class InferenceDeployment(Base):
929
941
  __tablename__ = "inference_deployments"
930
942
  id = Column(String(64), primary_key=True, index=True)
931
- node_id = Column(String(64), ForeignKey("compute_nodes.id"))
943
+
944
+ # Phase 4: node_id is now a plain string storing the Ray node ID (hex).
945
+ # FK to compute_nodes and uq_node_port_deployment unique constraint have
946
+ # been dropped from the DB — this column is no longer constrained.
947
+ node_id = Column(String(128), nullable=True)
948
+
949
+ internal_hostname = Column(String(128), nullable=True)
932
950
  base_model_id = Column(String(128), ForeignKey("base_models.id"))
933
951
  fine_tuned_model_id = Column(String(64), ForeignKey("fine_tuned_models.id"), nullable=True)
934
-
935
952
  port = Column(Integer, default=8000)
936
953
  status = Column(SAEnum(StatusEnum), default=StatusEnum.active)
937
954
  current_throughput = Column(Float, default=0.0)
938
955
  last_seen = Column(BigInteger, default=lambda: int(time.time()))
939
956
 
940
- node = relationship("ComputeNode", back_populates="deployments")
957
+ # Phase 4: node relationship removed — node_id is no longer a FK.
941
958
  base_model = relationship("BaseModel")
942
959
  fine_tuned_model = relationship("FineTunedModel")
943
-
944
- # FIX: Ensure a node cannot use the same port twice
945
- __table_args__ = (UniqueConstraint("node_id", "port", name="uq_node_port_deployment"),)
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: projectdavid-orm
3
- Version: 1.1.12
3
+ Version: 1.3.0
4
4
  Summary: Shared SQLAlchemy ORM models for ProjectDavid services
5
5
  Author-email: "Francis N." <francis.neequaye@projectdavid.co.uk>
6
6
  License: Polyform
7
- Project-URL: Homepage, https://github.com/frankie336/projectdavid-orm
7
+ Project-URL: Homepage, https://github.com/project-david-ai/projectdavid-orm
8
8
  Keywords: orm,sqlalchemy,models,projectdavid,internal
9
9
  Requires-Python: >=3.10
10
10
  Description-Content-Type: text/markdown