sunholo 0.89.6__py3-none-any.whl → 0.89.8__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.
- sunholo/agents/flask/vac_routes.py +3 -2
- sunholo/langfuse/evals.py +11 -3
- {sunholo-0.89.6.dist-info → sunholo-0.89.8.dist-info}/METADATA +2 -2
- {sunholo-0.89.6.dist-info → sunholo-0.89.8.dist-info}/RECORD +8 -8
- {sunholo-0.89.6.dist-info → sunholo-0.89.8.dist-info}/WHEEL +1 -1
- {sunholo-0.89.6.dist-info → sunholo-0.89.8.dist-info}/LICENSE.txt +0 -0
- {sunholo-0.89.6.dist-info → sunholo-0.89.8.dist-info}/entry_points.txt +0 -0
- {sunholo-0.89.6.dist-info → sunholo-0.89.8.dist-info}/top_level.txt +0 -0
|
@@ -22,7 +22,7 @@ except ImportError:
|
|
|
22
22
|
pass
|
|
23
23
|
|
|
24
24
|
try:
|
|
25
|
-
from
|
|
25
|
+
from ...pubsub import PubSubManager
|
|
26
26
|
except ImportError:
|
|
27
27
|
PubSubManager = None
|
|
28
28
|
|
|
@@ -242,11 +242,12 @@ if __name__ == "__main__":
|
|
|
242
242
|
|
|
243
243
|
# Generate a random float between 0 and 1
|
|
244
244
|
random_value = random.random()
|
|
245
|
-
|
|
245
|
+
log.info(f"Eval: {trace_id=} {eval_percent=} / {random_value=}")
|
|
246
246
|
# Check if evaluation should be triggered
|
|
247
247
|
if random_value < eval_percent:
|
|
248
248
|
if PubSubManager:
|
|
249
249
|
try:
|
|
250
|
+
log.info(f"Publishing for eval {trace_id=}")
|
|
250
251
|
pubsub_manager = PubSubManager("langfuse_evals", pubsub_topic="topicid-to-langfuse-eval")
|
|
251
252
|
the_data = {"trace_id": trace_id}
|
|
252
253
|
pubsub_manager.publish_message(the_data)
|
sunholo/langfuse/evals.py
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
|
+
import json
|
|
3
|
+
|
|
2
4
|
from ..pubsub import decode_pubsub_message
|
|
3
5
|
from langfuse import Langfuse
|
|
4
6
|
from ..custom_logging import log
|
|
@@ -27,10 +29,16 @@ def pubsub_to_evals(data: dict, eval_funcs: list=[eval_length]) -> dict:
|
|
|
27
29
|
# Decode the message
|
|
28
30
|
message_data, metadata, vector_name = decode_pubsub_message(data)
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
try:
|
|
33
|
+
the_json = json.loads(message_data)
|
|
34
|
+
except Exception as e:
|
|
35
|
+
log.error(f"Could not load message {message_data} as JSON - {str(e)}")
|
|
36
|
+
return None, {"metadata": f"Could not load message as JSON - {str(e)}"}
|
|
37
|
+
|
|
38
|
+
if 'trace_id' not in the_json:
|
|
39
|
+
raise ValueError(f'No trace_id found in json data {the_json=}')
|
|
32
40
|
|
|
33
|
-
trace_id =
|
|
41
|
+
trace_id = the_json.pop('trace_id', None)
|
|
34
42
|
|
|
35
43
|
return do_evals(trace_id, eval_funcs, **message_data)
|
|
36
44
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sunholo
|
|
3
|
-
Version: 0.89.
|
|
3
|
+
Version: 0.89.8
|
|
4
4
|
Summary: Large Language Model DevOps - a package to help deploy LLMs to the Cloud.
|
|
5
5
|
Home-page: https://github.com/sunholo-data/sunholo-py
|
|
6
|
-
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.89.
|
|
6
|
+
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.89.8.tar.gz
|
|
7
7
|
Author: Holosun ApS
|
|
8
8
|
Author-email: multivac@sunholo.com
|
|
9
9
|
License: Apache License, Version 2.0
|
|
@@ -14,7 +14,7 @@ sunholo/agents/fastapi/qna_routes.py,sha256=lKHkXPmwltu9EH3RMwmD153-J6pE7kWQ4BhB
|
|
|
14
14
|
sunholo/agents/flask/__init__.py,sha256=poJDKMr2qj8qMb99JqCvCPSiEt1tj2tLQ3hKW3f2aVw,107
|
|
15
15
|
sunholo/agents/flask/base.py,sha256=FgSaCODyoTtlstJtsqlLPScdgRUtv9_plxftdzHdVFo,809
|
|
16
16
|
sunholo/agents/flask/qna_routes.py,sha256=uwUD1yrzOPH27m2AXpiQrPk_2VfJOQOM6dAynOWQtoQ,22532
|
|
17
|
-
sunholo/agents/flask/vac_routes.py,sha256
|
|
17
|
+
sunholo/agents/flask/vac_routes.py,sha256=z3omGsb6Ze3Hpxx_em1vve9aPnRQQjYKdz0dkStmJ-I,22811
|
|
18
18
|
sunholo/archive/__init__.py,sha256=qNHWm5rGPVOlxZBZCpA1wTYPbalizRT7f8X4rs2t290,31
|
|
19
19
|
sunholo/archive/archive.py,sha256=PxVfDtO2_2ZEEbnhXSCbXLdeoHoQVImo4y3Jr2XkCFY,1204
|
|
20
20
|
sunholo/auth/__init__.py,sha256=TeP-OY0XGxYV_8AQcVGoh35bvyWhNUcMRfhuD5l44Sk,91
|
|
@@ -94,7 +94,7 @@ sunholo/invoke/direct_vac_func.py,sha256=fuTJlH5PsqWhN_yVMaWisHCTZU1JEUz8I8yVbWs
|
|
|
94
94
|
sunholo/invoke/invoke_vac_utils.py,sha256=sJc1edHTHMzMGXjji1N67c3iUaP7BmAL5nj82Qof63M,2053
|
|
95
95
|
sunholo/langfuse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
96
96
|
sunholo/langfuse/callback.py,sha256=jl0SZsFS53uMW9DGeM9SOL_EsRZsba0wwFGLqKzu9_U,1684
|
|
97
|
-
sunholo/langfuse/evals.py,sha256=
|
|
97
|
+
sunholo/langfuse/evals.py,sha256=TkZnJErN2n3IEEMIOaFtes--5bHvMpPcJz6hGliNtFc,3164
|
|
98
98
|
sunholo/langfuse/prompts.py,sha256=27BsVfihM6-h1jscbkGSO4HsATl-d4ZN6tcNCVztWoY,1300
|
|
99
99
|
sunholo/llamaindex/__init__.py,sha256=DlY_cHWCsVEV1C5WBgDdHRgOMlJc8pDoCRukUJ8PT9w,88
|
|
100
100
|
sunholo/llamaindex/get_files.py,sha256=6rhXCDqQ_lrIapISQ_OYQDjiSATXvS_9m3qq53-oIl0,781
|
|
@@ -144,9 +144,9 @@ sunholo/vertex/init.py,sha256=1OQwcPBKZYBTDPdyU7IM4X4OmiXLdsNV30C-fee2scQ,2875
|
|
|
144
144
|
sunholo/vertex/memory_tools.py,sha256=q_phxgGX2TG2j2MXNULF2xGzQnQPENwjPN9nZ_A9Gh0,7526
|
|
145
145
|
sunholo/vertex/safety.py,sha256=S9PgQT1O_BQAkcqauWncRJaydiP8Q_Jzmu9gxYfy1VA,2482
|
|
146
146
|
sunholo/vertex/type_dict_to_json.py,sha256=uTzL4o9tJRao4u-gJOFcACgWGkBOtqACmb6ihvCErL8,4694
|
|
147
|
-
sunholo-0.89.
|
|
148
|
-
sunholo-0.89.
|
|
149
|
-
sunholo-0.89.
|
|
150
|
-
sunholo-0.89.
|
|
151
|
-
sunholo-0.89.
|
|
152
|
-
sunholo-0.89.
|
|
147
|
+
sunholo-0.89.8.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
|
|
148
|
+
sunholo-0.89.8.dist-info/METADATA,sha256=kDmLpDCiMlsC_h6EK4A4l2EGqwQEgOXZJhUHzklEkk4,7706
|
|
149
|
+
sunholo-0.89.8.dist-info/WHEEL,sha256=ixB2d4u7mugx_bCBycvM9OzZ5yD7NmPXFRtKlORZS2Y,91
|
|
150
|
+
sunholo-0.89.8.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
|
|
151
|
+
sunholo-0.89.8.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
|
|
152
|
+
sunholo-0.89.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|