uncertainty-engine-types 0.0.12__py3-none-any.whl → 0.0.14__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.
@@ -1,6 +1,6 @@
1
1
  from . import utils
2
2
  from .chat_history import ChatHistory
3
- from .context import Context
3
+ from .context import Context, UserContext
4
4
  from .dataset import CSVDataset
5
5
  from .embeddings import TextEmbeddingsConfig, TextEmbeddingsProvider
6
6
  from .execution_error import ExecutionError
@@ -30,6 +30,7 @@ from .prompt import Prompt
30
30
  from .sensor_designer import SensorDesigner
31
31
  from .sql import SQLConfig, SQLKind
32
32
  from .token import Token
33
+ from .uncertainty_plot import UncertaintyPlot
33
34
  from .vector_store import VectorStoreConfig, VectorStoreProvider
34
35
  from .version import __version__
35
36
 
@@ -59,6 +60,7 @@ __all__ = [
59
60
  "NodeInfo",
60
61
  "NodeInputInfo",
61
62
  "NodeOutputInfo",
63
+ "NodeRequirementsInfo",
62
64
  "PDF",
63
65
  "Prompt",
64
66
  "ResourceID",
@@ -73,6 +75,8 @@ __all__ = [
73
75
  "TextEmbeddingsConfig",
74
76
  "TextEmbeddingsProvider",
75
77
  "Token",
78
+ "UserContext",
79
+ "UncertaintyPlot",
76
80
  "utils",
77
81
  "VectorStoreConfig",
78
82
  "VectorStoreProvider",
@@ -3,6 +3,12 @@ from pydantic import BaseModel
3
3
  from .node_info import NodeInfo
4
4
 
5
5
 
6
+ class UserContext(BaseModel):
7
+ email: str
8
+ project_id: str
9
+ cost_code: str
10
+
11
+
6
12
  class Context(BaseModel):
7
13
  sync: bool
8
14
  job_id: str
@@ -10,3 +16,4 @@ class Context(BaseModel):
10
16
  cache_url: str
11
17
  timeout: int
12
18
  nodes: dict[str, NodeInfo]
19
+ user: UserContext
@@ -4,7 +4,6 @@ from pydantic import BaseModel
4
4
 
5
5
 
6
6
  class ModelConfig(BaseModel):
7
- train_test_ratio: float = 1.0
8
7
  input_variance: Optional[float] = None
9
8
  output_variance: Optional[float] = None
10
9
  model_type: Literal["SingleTaskGPTorch"] = "SingleTaskGPTorch"
@@ -20,7 +20,24 @@ class NodeOutputInfo(BaseModel):
20
20
  description: str
21
21
 
22
22
 
23
- class NodeInfo(BaseModel):
23
+ class NodeRequirementsInfo(BaseModel):
24
+ cpu: int
25
+ gpu: bool
26
+ memory: int
27
+ timeout: int
28
+
29
+
30
+ class NodeInfo(BaseModel, extra="allow"):
31
+ """
32
+ Node information.
33
+ """
34
+
35
+ # New properties must be added as optional. The Node Registry uses this
36
+ # model and must support Nodes that don't provide a full set of details.
37
+ #
38
+ # Likewise, the `extra="allow"` argument allows the Node Registry to
39
+ # deserialise `NodeInfo` models with properties added post-release.
40
+
24
41
  id: str
25
42
  label: str
26
43
  category: str
@@ -30,6 +47,11 @@ class NodeInfo(BaseModel):
30
47
  cost: int
31
48
  inputs: dict[str, NodeInputInfo]
32
49
  outputs: dict[str, NodeOutputInfo] = {}
50
+ requirements: Optional[NodeRequirementsInfo] = None
51
+ """
52
+ Deployment requirements.
53
+ """
54
+
33
55
  load_balancer_url: Optional[str] = None
34
56
  queue_url: Optional[str] = None
35
57
  cache_url: Optional[str] = None
@@ -0,0 +1,19 @@
1
+ from pydantic import BaseModel, model_validator
2
+
3
+
4
+ class UncertaintyPlot(BaseModel, extra="forbid"):
5
+ x_label: str
6
+ y_label: str
7
+ x_vals: list[float]
8
+ mean: list[float]
9
+ std: list[float]
10
+ lower: list[float]
11
+ upper: list[float]
12
+
13
+ @model_validator(mode="after")
14
+ def validate_length(cls, model):
15
+ n = len(model.x_vals)
16
+ for _list in [model.mean, model.std, model.lower, model.upper]:
17
+ if n != len(_list):
18
+ raise ValueError("All lists must have the same length")
19
+ return model
@@ -1 +1 @@
1
- __version__ = "0.0.12"
1
+ __version__ = "0.0.14"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: uncertainty-engine-types
3
- Version: 0.0.12
3
+ Version: 0.0.14
4
4
  Summary: Common type definitions for the Uncertainty Engine
5
5
  Author: Freddy Wordingham
6
6
  Author-email: freddy@digilab.ai
@@ -1,6 +1,6 @@
1
- uncertainty_engine_types/__init__.py,sha256=_C9BE7MJkVmE1Ky2AVhSrcAro-QPf7dsNsbQTUcxZJc,1797
1
+ uncertainty_engine_types/__init__.py,sha256=jK69AKVZ6BkdrH0zGHPfLdTU9BPVad_AwJiKAr1Tr30,1926
2
2
  uncertainty_engine_types/chat_history.py,sha256=OY1fZXP7_AtPKEmgjxh60PlbEGtQWJWafZMgs2Ec0BU,121
3
- uncertainty_engine_types/context.py,sha256=k9rlArn-L2x1P5vWy5khfuqJW5tJOqr3NlhubZCbyG4,209
3
+ uncertainty_engine_types/context.py,sha256=1iDcfMLi_fKh_YVUAKif2NOdrA_vuXOQvBZKbF4uJZk,317
4
4
  uncertainty_engine_types/dataset.py,sha256=sDpQu5X3KxJ1lNkZOwhppJ2SY0Cv19cbcYfGpp_hyUQ,75
5
5
  uncertainty_engine_types/embeddings.py,sha256=sNDWjpuqmzOefKyQX--9EpdeTEyI4kQeSH4IELVUT7g,982
6
6
  uncertainty_engine_types/execution_error.py,sha256=tvIBuZPM8UhFUERHCEqoW8blAYYuBq1ZqidO0i_BCGs,105
@@ -12,15 +12,16 @@ uncertainty_engine_types/job.py,sha256=J_7tlWufZprOlePIEfBmir-5ZY9YXHmmALK_Ykj0u
12
12
  uncertainty_engine_types/llm.py,sha256=Ae7dw1R5RKLJHFjNwBzynLd-ddikKP0NsvHvoMdmnLM,916
13
13
  uncertainty_engine_types/message.py,sha256=5IY-S6Ipt6oYmnVSkRVv3QLSH-lKQvpxp_qF5YGSbok,209
14
14
  uncertainty_engine_types/model.py,sha256=O9E_7DE9AKEc1o2VnhpUyl3Quh4sGdV43gqDJwk-y68,196
15
- uncertainty_engine_types/model_config.py,sha256=Ghii7gk3zRhydGQJJJlzYRmMFW2cHBfwGj9FPNHEhCQ,320
16
- uncertainty_engine_types/node_info.py,sha256=2p87fCdX_CrdT2ZODtGJ-mR1Mvg46WhaE1GMddaEVak,800
15
+ uncertainty_engine_types/model_config.py,sha256=AeN5oR06uZJMGoAJoaI_Ix4nCy5nNcU2Wh69ijP39rQ,286
16
+ uncertainty_engine_types/node_info.py,sha256=XHONP6rNbAcLOHFxi-NPl1-UrKAH9P8C1yUr_rDiyCg,1362
17
17
  uncertainty_engine_types/prompt.py,sha256=l__qXytAapKg1Hoaj3RSVYN3rhy638nuUZIS-se0eMc,74
18
18
  uncertainty_engine_types/sensor_designer.py,sha256=hr3ek4_dRjRK0-78uaT6h8-bGUCm7Mfs6mxJSWxE64c,80
19
19
  uncertainty_engine_types/sql.py,sha256=SBzmgMEZ-sa-OBRoZbmKiOqddop4zJixgxx-JCus9fY,298
20
20
  uncertainty_engine_types/token.py,sha256=4tQQkvl-zsYoVk8ZEx0cB2JiU0VDRJ6uUe76XBXEpBY,178
21
+ uncertainty_engine_types/uncertainty_plot.py,sha256=kJr0SuJ6JeTxaf2adpDNWqx7vVLZRpKG8tFbdx90pas,547
21
22
  uncertainty_engine_types/utils.py,sha256=72QVig8Kb5uIR-e1nofm-3x9CouebdQJIruDbq-aIn0,271
22
23
  uncertainty_engine_types/vector_store.py,sha256=9fYPJ04jWcy2DruyUSjiKQAgmqq-wgeAi5dBIrAOm30,392
23
- uncertainty_engine_types/version.py,sha256=1SFj-qMOaeO0fOKQaFmYhAKiRwwNda5uWKpYtIcken8,23
24
- uncertainty_engine_types-0.0.12.dist-info/METADATA,sha256=ek29yMi9iXJbKzn-5SlUpo5XNeewelcu_Cc7B0T2Mzk,2816
25
- uncertainty_engine_types-0.0.12.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
26
- uncertainty_engine_types-0.0.12.dist-info/RECORD,,
24
+ uncertainty_engine_types/version.py,sha256=71Tw8stu19MsLPyF1q_DF5mb_BefzOTPYggLlSLvCms,23
25
+ uncertainty_engine_types-0.0.14.dist-info/METADATA,sha256=DKy3FpsiiBed4unRmOVzEi2e6XW352y8Iip5KLApHKE,2816
26
+ uncertainty_engine_types-0.0.14.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
27
+ uncertainty_engine_types-0.0.14.dist-info/RECORD,,