esd-services-api-client 2.5.1a122.dev9__tar.gz → 2.5.1a123.dev3__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.
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/PKG-INFO +1 -1
- esd_services_api_client-2.5.1a123.dev3/esd_services_api_client/_version.py +1 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/core/app_core.py +1 -1
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/telemetry/recorder.py +7 -8
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/telemetry/user_telemetry_recorder.py +12 -11
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/pyproject.toml +1 -1
- esd_services_api_client-2.5.1a122.dev9/esd_services_api_client/_version.py +0 -1
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/LICENSE +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/README.md +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/__init__.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/beast/__init__.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/beast/v3/__init__.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/beast/v3/_connector.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/beast/v3/_models.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/boxer/README.md +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/boxer/__init__.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/boxer/_auth.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/boxer/_base.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/boxer/_connector.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/boxer/_models.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/common/__init__.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/crystal/__init__.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/crystal/_api_versions.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/crystal/_connector.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/crystal/_models.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/README.md +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/__init__.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/abstractions/__init__.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/abstractions/algrorithm_cache.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/abstractions/input_object.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/abstractions/logger_factory.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/abstractions/nexus_object.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/abstractions/socket_provider.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/algorithms/__init__.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/algorithms/_baseline_algorithm.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/algorithms/_remote_algorithm.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/algorithms/distributed.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/algorithms/forked_algorithm.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/algorithms/minimalistic.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/algorithms/recursive.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/configurations/__init__.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/configurations/algorithm_configuration.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/core/__init__.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/core/app_dependencies.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/core/serializers.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/exceptions/__init__.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/exceptions/_nexus_error.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/exceptions/cache_errors.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/exceptions/input_reader_error.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/exceptions/startup_error.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/input/__init__.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/input/input_processor.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/input/input_reader.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/input/payload_reader.py +0 -0
- {esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/esd_services_api_client/nexus/telemetry/__init__.py +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = 'v2.5.1a123.dev3'
|
@@ -293,7 +293,7 @@ class Nexus:
|
|
293
293
|
)
|
294
294
|
on_complete_tasks = [
|
295
295
|
recorder.record_user_telemetry(
|
296
|
-
|
296
|
+
user_recorder=self._injector.get(on_complete_task_class),
|
297
297
|
run_id=self._run_args.request_id,
|
298
298
|
result=self._algorithm_run_task.result(),
|
299
299
|
**algorithm.inputs,
|
@@ -122,7 +122,7 @@ class TelemetryRecorder(NexusCoreObject):
|
|
122
122
|
|
123
123
|
def record_user_telemetry(
|
124
124
|
self,
|
125
|
-
|
125
|
+
user_recorder: UserTelemetryRecorder,
|
126
126
|
run_id: str,
|
127
127
|
result: AlgorithmResult,
|
128
128
|
**inputs: DataFrame,
|
@@ -130,17 +130,16 @@ class TelemetryRecorder(NexusCoreObject):
|
|
130
130
|
"""
|
131
131
|
Creates an awaitable task that records user telemetry using provided recorder type.
|
132
132
|
|
133
|
-
:param
|
133
|
+
:param user_recorder: Recorder type to record user telemetry.
|
134
134
|
:param run_id: The request_id to record user telemetry for.
|
135
135
|
:param result: Result of the algorithm.
|
136
136
|
:param inputs: Algorithm input data.
|
137
137
|
"""
|
138
138
|
return asyncio.create_task(
|
139
|
-
|
140
|
-
|
141
|
-
logger=self._logger,
|
142
|
-
storage_client=self._storage_client,
|
143
|
-
serializer=self._serializer,
|
139
|
+
user_recorder.record(
|
140
|
+
run_id=run_id,
|
144
141
|
telemetry_base_path=self._telemetry_base_path,
|
145
|
-
|
142
|
+
algorithm_result=result,
|
143
|
+
**inputs,
|
144
|
+
)
|
146
145
|
)
|
@@ -6,7 +6,7 @@ import re
|
|
6
6
|
from abc import ABC, abstractmethod
|
7
7
|
from dataclasses import dataclass
|
8
8
|
from functools import partial
|
9
|
-
from typing import final
|
9
|
+
from typing import final, Generic
|
10
10
|
|
11
11
|
from pandas import DataFrame
|
12
12
|
|
@@ -18,9 +18,8 @@ from adapta.utils.decorators import run_time_metrics_async
|
|
18
18
|
from dataclasses_json.stringcase import snakecase
|
19
19
|
from injector import inject
|
20
20
|
|
21
|
-
from esd_services_api_client.nexus.abstractions.nexus_object import
|
21
|
+
from esd_services_api_client.nexus.abstractions.nexus_object import TPayload, TResult
|
22
22
|
from esd_services_api_client.nexus.core.serializers import TelemetrySerializer
|
23
|
-
from esd_services_api_client.nexus.input.payload_reader import AlgorithmPayload
|
24
23
|
|
25
24
|
|
26
25
|
@final
|
@@ -66,7 +65,7 @@ class UserTelemetry:
|
|
66
65
|
return "/".join([str(t_path) for t_path in self._telemetry_path_segments])
|
67
66
|
|
68
67
|
|
69
|
-
class UserTelemetryRecorder(ABC):
|
68
|
+
class UserTelemetryRecorder(Generic[TPayload, TResult], ABC):
|
70
69
|
"""
|
71
70
|
Base class for user-defined telemetry recorders.
|
72
71
|
"""
|
@@ -74,19 +73,17 @@ class UserTelemetryRecorder(ABC):
|
|
74
73
|
@inject
|
75
74
|
def __init__(
|
76
75
|
self,
|
77
|
-
algorithm_payload:
|
76
|
+
algorithm_payload: TPayload,
|
78
77
|
metrics_provider: MetricsProvider,
|
79
78
|
logger: LoggerInterface,
|
80
79
|
storage_client: StorageClient,
|
81
80
|
serializer: TelemetrySerializer,
|
82
|
-
telemetry_base_path: str,
|
83
81
|
):
|
84
82
|
self._metrics_provider = metrics_provider
|
85
83
|
self._logger = logger
|
86
84
|
self._payload = algorithm_payload
|
87
85
|
self._storage_client = storage_client
|
88
86
|
self._serializer = serializer
|
89
|
-
self._telemetry_base_path = telemetry_base_path
|
90
87
|
|
91
88
|
@property
|
92
89
|
def _metric_tags(self) -> dict[str, str]:
|
@@ -95,8 +92,8 @@ class UserTelemetryRecorder(ABC):
|
|
95
92
|
@abstractmethod
|
96
93
|
async def _compute(
|
97
94
|
self,
|
98
|
-
algorithm_payload:
|
99
|
-
algorithm_result:
|
95
|
+
algorithm_payload: TPayload,
|
96
|
+
algorithm_result: TResult,
|
100
97
|
run_id: str,
|
101
98
|
**inputs: DataFrame,
|
102
99
|
) -> UserTelemetry:
|
@@ -105,7 +102,11 @@ class UserTelemetryRecorder(ABC):
|
|
105
102
|
"""
|
106
103
|
|
107
104
|
async def record(
|
108
|
-
self,
|
105
|
+
self,
|
106
|
+
algorithm_result: TResult,
|
107
|
+
telemetry_base_path: str,
|
108
|
+
run_id: str,
|
109
|
+
**inputs: DataFrame,
|
109
110
|
):
|
110
111
|
"""
|
111
112
|
Record user-defined telemetry data.
|
@@ -141,7 +142,7 @@ class UserTelemetryRecorder(ABC):
|
|
141
142
|
blob_path=DataSocket(
|
142
143
|
alias="user_telemetry",
|
143
144
|
data_path=os.path.join(
|
144
|
-
|
145
|
+
telemetry_base_path,
|
145
146
|
"telemetry_group=user",
|
146
147
|
f"recorder_class={self.__class__.alias()}",
|
147
148
|
telemetry.telemetry_path, # path join eliminates empty segments
|
{esd_services_api_client-2.5.1a122.dev9 → esd_services_api_client-2.5.1a123.dev3}/pyproject.toml
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "esd-services-api-client"
|
3
|
-
version = "v2.5.
|
3
|
+
version = "v2.5.1a123.dev3"
|
4
4
|
description = "Python clients for ESD services"
|
5
5
|
authors = ["ECCO Sneaks & Data <esdsupport@ecco.com>"]
|
6
6
|
maintainers = ['GZU <gzu@ecco.com>', 'JRB <ext-jrb@ecco.com>', 'VISA <visa@ecco.com>']
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = 'v2.5.1a122.dev9'
|
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
|
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
|