trustgraph-base 0.23.2__tar.gz → 0.23.4__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.
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/PKG-INFO +2 -2
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/async_processor.py +1 -1
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/consumer_spec.py +1 -1
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/flow_processor.py +2 -1
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/publisher.py +6 -2
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/request_response_spec.py +3 -1
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/subscriber.py +17 -6
- trustgraph-base-0.23.4/trustgraph/base_version.py +1 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph_base.egg-info/PKG-INFO +2 -2
- trustgraph-base-0.23.2/trustgraph/base_version.py +0 -1
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/README.md +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/setup.cfg +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/setup.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/api/__init__.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/api/api.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/__init__.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/agent_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/agent_service.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/consumer.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/document_embeddings_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/document_embeddings_query_service.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/document_embeddings_store_service.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/embeddings_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/embeddings_service.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/flow.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/graph_embeddings_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/graph_embeddings_query_service.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/graph_embeddings_store_service.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/graph_rag_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/llm_service.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/metrics.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/producer.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/producer_spec.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/prompt_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/pubsub.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/setting_spec.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/spec.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/subscriber_spec.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/text_completion_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/triples_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/triples_query_service.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/triples_store_service.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/__init__.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/agent_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/base.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/config_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/document_embeddings_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/document_rag_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/embeddings_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/graph_embeddings_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/graph_rag_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/llm_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/prompt_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/triples_query_client.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/exceptions.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/knowledge/__init__.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/knowledge/defs.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/knowledge/document.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/knowledge/identifier.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/knowledge/organization.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/knowledge/publication.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/log_level.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/objects/__init__.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/objects/field.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/objects/object.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/rdf.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/__init__.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/agent.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/config.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/documents.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/flows.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/graph.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/library.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/lookup.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/metadata.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/models.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/object.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/prompt.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/retrieval.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/topic.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/schema/types.py +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph_base.egg-info/SOURCES.txt +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph_base.egg-info/dependency_links.txt +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph_base.egg-info/requires.txt +0 -0
- {trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph_base.egg-info/top_level.txt +0 -0
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-base
|
3
|
-
Version: 0.23.
|
3
|
+
Version: 0.23.4
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
5
5
|
Home-page: https://github.com/trustgraph-ai/trustgraph
|
6
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.
|
6
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.4.tar.gz
|
7
7
|
Author: trustgraph.ai
|
8
8
|
Author-email: security@trustgraph.ai
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
@@ -114,7 +114,7 @@ class AsyncProcessor:
|
|
114
114
|
version = message.value().version
|
115
115
|
|
116
116
|
# Invoke message handlers
|
117
|
-
print("Config change event",
|
117
|
+
print("Config change event", version, flush=True)
|
118
118
|
for ch in self.config_handlers:
|
119
119
|
await ch(config, version)
|
120
120
|
|
@@ -20,7 +20,7 @@ class ConsumerSpec(Spec):
|
|
20
20
|
flow = flow,
|
21
21
|
client = processor.pulsar_client,
|
22
22
|
topic = definition[self.name],
|
23
|
-
subscriber = processor.id + "--" + self.name,
|
23
|
+
subscriber = processor.id + "--" + flow.name + "--" + self.name,
|
24
24
|
schema = self.schema,
|
25
25
|
handler = self.handler,
|
26
26
|
metrics = consumer_metrics,
|
@@ -75,7 +75,8 @@ class FlowProcessor(AsyncProcessor):
|
|
75
75
|
# Get list of flows which should be running and are currently
|
76
76
|
# running
|
77
77
|
wanted_flows = flow_config.keys()
|
78
|
-
|
78
|
+
# This takes a copy, needed because dict gets modified by stop_flow
|
79
|
+
current_flows = list(self.flows.keys())
|
79
80
|
|
80
81
|
# Start all the flows which arent currently running
|
81
82
|
for flow in wanted_flows:
|
@@ -21,6 +21,7 @@ class Publisher:
|
|
21
21
|
|
22
22
|
async def stop(self):
|
23
23
|
self.running = False
|
24
|
+
await self.task
|
24
25
|
|
25
26
|
async def join(self):
|
26
27
|
await self.stop()
|
@@ -42,7 +43,7 @@ class Publisher:
|
|
42
43
|
try:
|
43
44
|
id, item = await asyncio.wait_for(
|
44
45
|
self.q.get(),
|
45
|
-
timeout=0.
|
46
|
+
timeout=0.25
|
46
47
|
)
|
47
48
|
except asyncio.TimeoutError:
|
48
49
|
continue
|
@@ -57,8 +58,11 @@ class Publisher:
|
|
57
58
|
except Exception as e:
|
58
59
|
print("Exception:", e, flush=True)
|
59
60
|
|
61
|
+
if not self.running:
|
62
|
+
return
|
63
|
+
|
60
64
|
# If handler drops out, sleep a retry
|
61
|
-
|
65
|
+
await asyncio.sleep(1)
|
62
66
|
|
63
67
|
async def send(self, id, item):
|
64
68
|
await self.q.put((id, item))
|
@@ -127,7 +127,9 @@ class RequestResponseSpec(Spec):
|
|
127
127
|
|
128
128
|
rr = self.impl(
|
129
129
|
client = processor.pulsar_client,
|
130
|
-
subscription =
|
130
|
+
subscription = (
|
131
|
+
processor.id + "--" + flow.name + "--" + self.request_name
|
132
|
+
),
|
131
133
|
consumer_name = flow.id,
|
132
134
|
request_topic = definition[self.request_name],
|
133
135
|
request_schema = self.request_schema,
|
@@ -20,7 +20,7 @@ class Subscriber:
|
|
20
20
|
self.running = True
|
21
21
|
self.metrics = metrics
|
22
22
|
|
23
|
-
|
23
|
+
def __del__(self):
|
24
24
|
self.running = False
|
25
25
|
|
26
26
|
async def start(self):
|
@@ -28,6 +28,7 @@ class Subscriber:
|
|
28
28
|
|
29
29
|
async def stop(self):
|
30
30
|
self.running = False
|
31
|
+
await self.task
|
31
32
|
|
32
33
|
async def join(self):
|
33
34
|
await self.stop()
|
@@ -35,6 +36,8 @@ class Subscriber:
|
|
35
36
|
|
36
37
|
async def run(self):
|
37
38
|
|
39
|
+
consumer = None
|
40
|
+
|
38
41
|
while self.running:
|
39
42
|
|
40
43
|
if self.metrics:
|
@@ -59,7 +62,7 @@ class Subscriber:
|
|
59
62
|
try:
|
60
63
|
msg = await asyncio.to_thread(
|
61
64
|
consumer.receive,
|
62
|
-
timeout_millis=
|
65
|
+
timeout_millis=250
|
63
66
|
)
|
64
67
|
except _pulsar.Timeout:
|
65
68
|
continue
|
@@ -91,7 +94,7 @@ class Subscriber:
|
|
91
94
|
# FIXME: Timeout means data goes missing
|
92
95
|
await asyncio.wait_for(
|
93
96
|
self.q[id].put(value),
|
94
|
-
timeout=
|
97
|
+
timeout=1
|
95
98
|
)
|
96
99
|
|
97
100
|
except Exception as e:
|
@@ -103,7 +106,7 @@ class Subscriber:
|
|
103
106
|
# FIXME: Timeout means data goes missing
|
104
107
|
await asyncio.wait_for(
|
105
108
|
q.put(value),
|
106
|
-
timeout=
|
109
|
+
timeout=1
|
107
110
|
)
|
108
111
|
except Exception as e:
|
109
112
|
self.metrics.dropped()
|
@@ -112,13 +115,21 @@ class Subscriber:
|
|
112
115
|
except Exception as e:
|
113
116
|
print("Subscriber exception:", e, flush=True)
|
114
117
|
|
115
|
-
|
118
|
+
finally:
|
119
|
+
|
120
|
+
if consumer:
|
121
|
+
consumer.close()
|
122
|
+
consumer = None
|
123
|
+
|
116
124
|
|
117
125
|
if self.metrics:
|
118
126
|
self.metrics.state("stopped")
|
119
127
|
|
128
|
+
if not self.running:
|
129
|
+
return
|
130
|
+
|
120
131
|
# If handler drops out, sleep a retry
|
121
|
-
|
132
|
+
await asyncio.sleep(1)
|
122
133
|
|
123
134
|
async def subscribe(self, id):
|
124
135
|
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.23.4"
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-base
|
3
|
-
Version: 0.23.
|
3
|
+
Version: 0.23.4
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
5
5
|
Home-page: https://github.com/trustgraph-ai/trustgraph
|
6
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.
|
6
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.4.tar.gz
|
7
7
|
Author: trustgraph.ai
|
8
8
|
Author-email: security@trustgraph.ai
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.23.2"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/document_embeddings_client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/graph_embeddings_client.py
RENAMED
File without changes
|
{trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/graph_embeddings_query_service.py
RENAMED
File without changes
|
{trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/base/graph_embeddings_store_service.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/document_embeddings_client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/graph_embeddings_client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph/clients/triples_query_client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.23.2 → trustgraph-base-0.23.4}/trustgraph_base.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|