esd-services-api-client 2.5.4__py3-none-any.whl → 2.5.6__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.
- esd_services_api_client/__init__.py +1 -1
- esd_services_api_client/nexus/algorithms/__init__.py +1 -0
- esd_services_api_client/nexus/algorithms/_remote_algorithm.py +2 -0
- esd_services_api_client/nexus/algorithms/forked_algorithm.py +6 -3
- {esd_services_api_client-2.5.4.dist-info → esd_services_api_client-2.5.6.dist-info}/METADATA +2 -3
- {esd_services_api_client-2.5.4.dist-info → esd_services_api_client-2.5.6.dist-info}/RECORD +8 -8
- {esd_services_api_client-2.5.4.dist-info → esd_services_api_client-2.5.6.dist-info}/WHEEL +1 -1
- {esd_services_api_client-2.5.4.dist-info → esd_services_api_client-2.5.6.dist-info}/LICENSE +0 -0
@@ -21,3 +21,4 @@ from esd_services_api_client.nexus.algorithms.minimalistic import *
|
|
21
21
|
from esd_services_api_client.nexus.algorithms.recursive import *
|
22
22
|
from esd_services_api_client.nexus.algorithms.distributed import *
|
23
23
|
from esd_services_api_client.nexus.algorithms._baseline_algorithm import *
|
24
|
+
from esd_services_api_client.nexus.algorithms._remote_algorithm import *
|
@@ -23,6 +23,7 @@ from functools import partial
|
|
23
23
|
|
24
24
|
from adapta.metrics import MetricsProvider
|
25
25
|
from adapta.utils.decorators import run_time_metrics_async
|
26
|
+
from injector import inject
|
26
27
|
|
27
28
|
from esd_services_api_client.crystal import CrystalConnector, AlgorithmConfiguration
|
28
29
|
from esd_services_api_client.nexus.abstractions.algrorithm_cache import InputCache
|
@@ -43,6 +44,7 @@ class RemoteAlgorithm(NexusObject[TPayload, AlgorithmResult]):
|
|
43
44
|
Base class for all algorithm implementations.
|
44
45
|
"""
|
45
46
|
|
47
|
+
@inject
|
46
48
|
def __init__(
|
47
49
|
self,
|
48
50
|
metrics_provider: MetricsProvider,
|
@@ -143,13 +143,15 @@ class ForkedAlgorithm(NexusObject[TPayload, AlgorithmResult]):
|
|
143
143
|
|
144
144
|
return await self._main_run(**run_args)
|
145
145
|
|
146
|
-
if self._is_forked(**kwargs):
|
146
|
+
if await self._is_forked(**kwargs):
|
147
147
|
self._inputs = await self._fork_inputs(**kwargs)
|
148
148
|
else:
|
149
149
|
self._inputs = await self._main_inputs(**kwargs)
|
150
150
|
|
151
151
|
# evaluate if additional forks will be spawned
|
152
|
-
forks = await partial(
|
152
|
+
forks: list[RemoteAlgorithm] = await partial(
|
153
|
+
self._get_forks, **self._inputs, **kwargs
|
154
|
+
)()
|
153
155
|
|
154
156
|
if len(forks) > 0:
|
155
157
|
self._logger.info(
|
@@ -161,6 +163,7 @@ class ForkedAlgorithm(NexusObject[TPayload, AlgorithmResult]):
|
|
161
163
|
|
162
164
|
run_result = await partial(
|
163
165
|
_measured_run,
|
166
|
+
**kwargs,
|
164
167
|
**self._inputs,
|
165
168
|
metric_tags=self._metric_tags,
|
166
169
|
metrics_provider=self._metrics_provider,
|
@@ -168,6 +171,6 @@ class ForkedAlgorithm(NexusObject[TPayload, AlgorithmResult]):
|
|
168
171
|
)()
|
169
172
|
|
170
173
|
# now await callback scheduling
|
171
|
-
await asyncio.wait([fork.run(**kwargs) for fork in forks])
|
174
|
+
await asyncio.wait([asyncio.create_task(fork.run(**kwargs)) for fork in forks])
|
172
175
|
|
173
176
|
return run_result
|
{esd_services_api_client-2.5.4.dist-info → esd_services_api_client-2.5.6.dist-info}/METADATA
RENAMED
@@ -1,8 +1,7 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: esd-services-api-client
|
3
|
-
Version: 2.5.
|
3
|
+
Version: 2.5.6
|
4
4
|
Summary: Python clients for ESD services
|
5
|
-
Home-page: https://github.com/SneaksAndData/esd-services-api-client
|
6
5
|
License: Apache 2.0
|
7
6
|
Author: ECCO Sneaks & Data
|
8
7
|
Author-email: esdsupport@ecco.com
|
@@ -1,4 +1,4 @@
|
|
1
|
-
esd_services_api_client/__init__.py,sha256=
|
1
|
+
esd_services_api_client/__init__.py,sha256=9vhaoII6t_U6HdNMfsrT2PcCLfdmBNQAN_DkoLF7QXo,648
|
2
2
|
esd_services_api_client/beast/__init__.py,sha256=zNhXcHSP5w4P9quM1XP4oXVJEccvC_VScG41TZ0GzZ8,723
|
3
3
|
esd_services_api_client/beast/v3/__init__.py,sha256=FtumtInoDyCCRE424Llqv8QZLRuwXzj-smyfu1od1nc,754
|
4
4
|
esd_services_api_client/beast/v3/_connector.py,sha256=VqxiCzJWKERh42aZAIphzmOEG5cdOcKM0DQzG7eQ_-8,11479
|
@@ -22,11 +22,11 @@ esd_services_api_client/nexus/abstractions/input_object.py,sha256=RUKnhekuZwd_RV
|
|
22
22
|
esd_services_api_client/nexus/abstractions/logger_factory.py,sha256=9biONvCqNrP__yrmeRkoDL05TMA5v-LyrcKwgiKG59U,2019
|
23
23
|
esd_services_api_client/nexus/abstractions/nexus_object.py,sha256=rLE42imCVGE6Px4Yu6X6C4b69gA1grK-7Md_SuCLN2Q,3115
|
24
24
|
esd_services_api_client/nexus/abstractions/socket_provider.py,sha256=Rwa_aPErI4Es5AdyCd3EoGze7mg2D70u8kuc2UGEBaI,1729
|
25
|
-
esd_services_api_client/nexus/algorithms/__init__.py,sha256=
|
25
|
+
esd_services_api_client/nexus/algorithms/__init__.py,sha256=v4rPDf36r6AaHi_3K8isBKYU_fG8ct3w14KpUg2XRgg,976
|
26
26
|
esd_services_api_client/nexus/algorithms/_baseline_algorithm.py,sha256=24ALLx4Bxlgi0EwZB1a0SJeEwBUWKj7CGad-CpIygU0,2925
|
27
|
-
esd_services_api_client/nexus/algorithms/_remote_algorithm.py,sha256=
|
27
|
+
esd_services_api_client/nexus/algorithms/_remote_algorithm.py,sha256=IdTKdNbFirrUM9H2mTnk-vlbObEwyG8xRQZbauf6CEQ,3940
|
28
28
|
esd_services_api_client/nexus/algorithms/distributed.py,sha256=vkKSCsd480RKwrtu3uZ2iU1bh593fkgBcOBrcb9cLjA,1702
|
29
|
-
esd_services_api_client/nexus/algorithms/forked_algorithm.py,sha256=
|
29
|
+
esd_services_api_client/nexus/algorithms/forked_algorithm.py,sha256=vD711cyGUmyiBXPPEh5DnZ8ID9bygtqGvp7sTRfEMnI,5880
|
30
30
|
esd_services_api_client/nexus/algorithms/minimalistic.py,sha256=tSYXodIW-_Aje-_ZyYUoWAThcZIeE4_kMvMINsT4Lb8,1644
|
31
31
|
esd_services_api_client/nexus/algorithms/recursive.py,sha256=uaCCl4q-st_KqbcmkdOJedJ0nAjbJvn6jdZEdW0_0ss,2007
|
32
32
|
esd_services_api_client/nexus/configurations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -47,7 +47,7 @@ esd_services_api_client/nexus/input/payload_reader.py,sha256=Kq0xN1Shyqv71v6Ykcr
|
|
47
47
|
esd_services_api_client/nexus/telemetry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
48
48
|
esd_services_api_client/nexus/telemetry/recorder.py,sha256=j4x-wOSNZHkFco-ENlKtSm22d4WGHmuzKMnzvGQAtlQ,4849
|
49
49
|
esd_services_api_client/nexus/telemetry/user_telemetry_recorder.py,sha256=NOcb2l1SkMHinBXSrfbiBZSpufzhBWkuh3Px3NXrkcg,4997
|
50
|
-
esd_services_api_client-2.5.
|
51
|
-
esd_services_api_client-2.5.
|
52
|
-
esd_services_api_client-2.5.
|
53
|
-
esd_services_api_client-2.5.
|
50
|
+
esd_services_api_client-2.5.6.dist-info/LICENSE,sha256=0gS6zXsPp8qZhzi1xaGCIYPzb_0e8on7HCeFJe8fOpw,10693
|
51
|
+
esd_services_api_client-2.5.6.dist-info/METADATA,sha256=bUONn6J8CxYVg-xYE1RxkBlLFsgsU5la9fSNK_VhM38,1164
|
52
|
+
esd_services_api_client-2.5.6.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
53
|
+
esd_services_api_client-2.5.6.dist-info/RECORD,,
|
File without changes
|