esd-services-api-client 2.6.1a149.dev16__py3-none-any.whl → 2.6.2a150.dev14__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 +1 @@
1
- __version__ = 'v2.6.1a149.dev16'
1
+ __version__ = 'v2.6.2a150.dev14'
@@ -220,6 +220,7 @@ class BeastConnector:
220
220
  f"Execution failed, please find request's log at: {self.base_url}/job/logs/{request_id}"
221
221
  )
222
222
 
223
+ # pylint: disable=too-many-positional-arguments
223
224
  @staticmethod
224
225
  def _report_backoff_failure(
225
226
  target: Any, args: Any, kwargs: Any, tries: int, elapsed: int, wait: int, **_
@@ -151,6 +151,7 @@ class CrystalConnector:
151
151
  def __exit__(self, exc_type, exc_val, exc_tb):
152
152
  self.dispose()
153
153
 
154
+ # pylint: disable=too-many-positional-arguments
154
155
  def create_run(
155
156
  self,
156
157
  algorithm: str,
@@ -36,8 +36,6 @@ class BootstrapLogger(LoggerInterface, ABC):
36
36
  Dummy class to separate bootstrap logging from core app loggers
37
37
  """
38
38
 
39
- pass
40
-
41
39
 
42
40
  @final
43
41
  class BootstrapLoggerFactory:
@@ -44,6 +44,7 @@ class RemoteAlgorithm(NexusObject[TPayload, AlgorithmResult]):
44
44
  Base class for all algorithm implementations.
45
45
  """
46
46
 
47
+ # pylint: disable=too-many-positional-arguments
47
48
  @inject
48
49
  def __init__(
49
50
  self,
@@ -215,6 +215,11 @@ class Nexus:
215
215
  | None = None,
216
216
  delimiter: str = ", ",
217
217
  ) -> "Nexus":
218
+ """
219
+ Adds a log `tagger` and a log `enricher` to be used with injected logger.
220
+ A log `tagger` will add key-value tags to each emitted log message, and those tags can be inferred from the payload and entrypoint arguments.
221
+ A log `enricher` will add additional static templated content to log messages, and render those templates using payload properties entrypoint argyments.
222
+ """
218
223
  self._log_tagger = tagger
219
224
  self._log_enricher = enricher
220
225
  self._log_enrichment_delimiter = delimiter
@@ -323,7 +328,9 @@ class Nexus:
323
328
  if not self._log_enricher
324
329
  else self._log_enricher(payload, self._run_args),
325
330
  fixed_template_delimiter=self._log_enrichment_delimiter,
326
- global_tags=self._log_tagger(payload, self._run_args),
331
+ global_tags=self._log_tagger(payload, self._run_args)
332
+ if self._log_tagger
333
+ else None,
327
334
  )
328
335
  # bind app-level LoggerFactory now
329
336
  self._injector.binder.bind(
@@ -378,8 +385,8 @@ class Nexus:
378
385
 
379
386
  # record telemetry
380
387
  root_logger.info(
381
- "Recording telemetry for the run {request_id}",
382
- request_id=self._run_args.request_id,
388
+ "Recording telemetry for the run {run_id}",
389
+ run_id=self._run_args.request_id,
383
390
  )
384
391
  async with telemetry_recorder as recorder:
385
392
  await recorder.record(
@@ -418,6 +425,9 @@ class Nexus:
418
425
 
419
426
  root_logger.stop()
420
427
 
428
+ if os.getenv("NEXUS__RAISE_ERROR_ON_COMPLETE") and ex is not None:
429
+ raise ex
430
+
421
431
  @classmethod
422
432
  def create(cls) -> "Nexus":
423
433
  """
@@ -1,6 +1,7 @@
1
1
  """
2
2
  Code infrastructure for manipulating payload received from Crystal SAS URI
3
3
  """
4
+ import os
4
5
 
5
6
  # Copyright (c) 2023-2024. ECCO Sneaks & Data
6
7
  #
@@ -62,8 +63,15 @@ class AlgorithmPayloadReader:
62
63
  self._http.close()
63
64
  self._http = None
64
65
 
65
- def __init__(self, payload_uri: str, payload_type: Type[AlgorithmPayload]):
66
- self._http = session_with_retries()
66
+ def __init__(
67
+ self,
68
+ payload_uri: str,
69
+ payload_type: Type[AlgorithmPayload],
70
+ ):
71
+ self._http = session_with_retries(
72
+ file_protocol_supported=os.getenv("NEXUS__SUPPORT_FILE_PROTOCOL_PAYLOADS")
73
+ is not None
74
+ )
67
75
  self._payload: Optional[AlgorithmPayload] = None
68
76
  self._payload_uri = payload_uri
69
77
  self._payload_type = payload_type
@@ -70,6 +70,7 @@ class UserTelemetryRecorder(Generic[TPayload, TResult], ABC):
70
70
  Base class for user-defined telemetry recorders.
71
71
  """
72
72
 
73
+ # pylint: disable=too-many-positional-arguments
73
74
  @inject
74
75
  def __init__(
75
76
  self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: esd-services-api-client
3
- Version: 2.6.1a149.dev16
3
+ Version: 2.6.2a150.dev14
4
4
  Summary: Python clients for ESD services
5
5
  License: Apache 2.0
6
6
  Author: ECCO Sneaks & Data
@@ -1,8 +1,8 @@
1
1
  esd_services_api_client/__init__.py,sha256=4LskDwFuAFMOjHtN3_-71G_VZ4MNfjMJ7wX2cHYxV-0,648
2
- esd_services_api_client/_version.py,sha256=lzHqXFORcsluQ7ciI6_T8fZaZZjTt0NaAja2SmA6zF4,33
2
+ esd_services_api_client/_version.py,sha256=dp54ec8qgzKaNtVemStWxDL5MRflL3HL4ABk2bS9_B4,33
3
3
  esd_services_api_client/beast/__init__.py,sha256=zNhXcHSP5w4P9quM1XP4oXVJEccvC_VScG41TZ0GzZ8,723
4
4
  esd_services_api_client/beast/v3/__init__.py,sha256=FtumtInoDyCCRE424Llqv8QZLRuwXzj-smyfu1od1nc,754
5
- esd_services_api_client/beast/v3/_connector.py,sha256=VqxiCzJWKERh42aZAIphzmOEG5cdOcKM0DQzG7eQ_-8,11479
5
+ esd_services_api_client/beast/v3/_connector.py,sha256=46XQdUIQVnWfs_Fn8soKeL59IryT5hnEYFYJdKSmFUY,11531
6
6
  esd_services_api_client/beast/v3/_models.py,sha256=UyBAEtJhDtF_qPE6TB9QWoffvNk1nY-AXm9bMTVBT2U,6766
7
7
  esd_services_api_client/boxer/README.md,sha256=-MAhYUPvmEMcgx_lo_2PlH_gZI1lndGv8fnDQYIpurU,3618
8
8
  esd_services_api_client/boxer/__init__.py,sha256=yDEcfL-9q0H91UWr-al-1iMJtVLv-oIXky6hUmFZs0g,785
@@ -13,19 +13,19 @@ esd_services_api_client/boxer/_models.py,sha256=ursQIR_c9jcVfRKc0LH1OuVL2KFD6kqo
13
13
  esd_services_api_client/common/__init__.py,sha256=L-cEW1mVbnTJLCLG5V6Ucw7zBgx1zf0t1bYcQC1heyw,603
14
14
  esd_services_api_client/crystal/__init__.py,sha256=oeyJjdQ9EpTnIq6XnjPq5v0DWPdHqi4uEfRIcD1mNZA,792
15
15
  esd_services_api_client/crystal/_api_versions.py,sha256=GHbmV_5lP9fP72TZE0j_ZeQSeJjMRcRaBRxNJbz-MWQ,837
16
- esd_services_api_client/crystal/_connector.py,sha256=0CqBpPahozAnentM6ZZrH84s_D7SoWCShr5_cRQGMX8,13110
16
+ esd_services_api_client/crystal/_connector.py,sha256=46D6VBRLgz2Y1mm95Q8m4L7SJNYHzTKtzTVVtECuXrA,13162
17
17
  esd_services_api_client/crystal/_models.py,sha256=j8SEbwp_iAKjn06i-0f8npmhQhs2YJlmQ3eHwc2TwQE,4366
18
18
  esd_services_api_client/nexus/README.md,sha256=hNFV_fzAGrG6_1yXE3o_GuLTKIWEia2FfedMh-Sg0ew,10619
19
19
  esd_services_api_client/nexus/__init__.py,sha256=sOgKKq3_LZGbLmQMtMS7lDw2hv027qownTmNIRV0BB8,627
20
20
  esd_services_api_client/nexus/abstractions/__init__.py,sha256=sOgKKq3_LZGbLmQMtMS7lDw2hv027qownTmNIRV0BB8,627
21
21
  esd_services_api_client/nexus/abstractions/algrorithm_cache.py,sha256=6GevJJ7mf1c_PImhKQ_4_6n652VyHlgK_12LNidirxs,3644
22
22
  esd_services_api_client/nexus/abstractions/input_object.py,sha256=RUKnhekuZwd_RVvnLGAxHa4wYDFJf6wEwWQI9f-o0lM,1761
23
- esd_services_api_client/nexus/abstractions/logger_factory.py,sha256=agkmveLTMwsDx5XdG9TNTEHaFi0leQF3MVSwOUn66os,3957
23
+ esd_services_api_client/nexus/abstractions/logger_factory.py,sha256=oJStrOPir8J18E3ALhUTCQrj3rbjo2yuYrnjpDwLQg8,3947
24
24
  esd_services_api_client/nexus/abstractions/nexus_object.py,sha256=rLE42imCVGE6Px4Yu6X6C4b69gA1grK-7Md_SuCLN2Q,3115
25
25
  esd_services_api_client/nexus/abstractions/socket_provider.py,sha256=Rwa_aPErI4Es5AdyCd3EoGze7mg2D70u8kuc2UGEBaI,1729
26
26
  esd_services_api_client/nexus/algorithms/__init__.py,sha256=v4rPDf36r6AaHi_3K8isBKYU_fG8ct3w14KpUg2XRgg,976
27
27
  esd_services_api_client/nexus/algorithms/_baseline_algorithm.py,sha256=KUBkfDKIuxfa7IcVKau10ZZLIwrLbvVkNHjuIGkdjlQ,2947
28
- esd_services_api_client/nexus/algorithms/_remote_algorithm.py,sha256=uQFoUfgATcoPDHakVChxTtAYY51ov7tOizkLRlofebA,3962
28
+ esd_services_api_client/nexus/algorithms/_remote_algorithm.py,sha256=6aCxuR6Hiu2ScrC4O18nRbecAoKITtYAsWzUzY0vp0E,4014
29
29
  esd_services_api_client/nexus/algorithms/distributed.py,sha256=vkKSCsd480RKwrtu3uZ2iU1bh593fkgBcOBrcb9cLjA,1702
30
30
  esd_services_api_client/nexus/algorithms/forked_algorithm.py,sha256=VLKKNJvTa5rNjRFWCMk5w0ZZ8-4JoNegY7ldvVzMGDo,5873
31
31
  esd_services_api_client/nexus/algorithms/minimalistic.py,sha256=tSYXodIW-_Aje-_ZyYUoWAThcZIeE4_kMvMINsT4Lb8,1644
@@ -33,7 +33,7 @@ esd_services_api_client/nexus/algorithms/recursive.py,sha256=uaCCl4q-st_KqbcmkdO
33
33
  esd_services_api_client/nexus/configurations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  esd_services_api_client/nexus/configurations/algorithm_configuration.py,sha256=eE7diX2PATCGkmqhvFOcZwXrr6vns4fqnJGmgNvhhZM,1091
35
35
  esd_services_api_client/nexus/core/__init__.py,sha256=sOgKKq3_LZGbLmQMtMS7lDw2hv027qownTmNIRV0BB8,627
36
- esd_services_api_client/nexus/core/app_core.py,sha256=eCqZJewfeM6Z7OVPl3ItJFkP_VPMCIoiL-3Xx-Zl9Mg,15053
36
+ esd_services_api_client/nexus/core/app_core.py,sha256=kDbtE7qTfQpBkoU64ecRBAGPrUpS9mHM7kqPG4vRO38,15629
37
37
  esd_services_api_client/nexus/core/app_dependencies.py,sha256=1m7Oc9JCXyrU0qVZekYhpbXLQo20aQPQ-Bf8zEdjtqI,8704
38
38
  esd_services_api_client/nexus/core/serializers.py,sha256=Vk9FaEeDHXx3S7rPlYoWzsOcN6gzLzemsrjq6ytfaI0,2217
39
39
  esd_services_api_client/nexus/exceptions/__init__.py,sha256=feN33VdqB5-2bD9aJesJl_OlsKrNNo3hZCnQgKuaU9k,696
@@ -44,14 +44,14 @@ esd_services_api_client/nexus/exceptions/startup_error.py,sha256=4Hughi57Ndi_a8Y
44
44
  esd_services_api_client/nexus/input/__init__.py,sha256=ODYhZ791tPC4-eVxSRRlh8FLDDICU7nByLH7c4TD4Xc,758
45
45
  esd_services_api_client/nexus/input/input_processor.py,sha256=vqzeQrtRFqBKTPSEiWX_JZJTF9itMwwvWjPnJVLrSwQ,3132
46
46
  esd_services_api_client/nexus/input/input_reader.py,sha256=aXNMGxrdUX5RDYR666GSGkcZqYMFYoZ8zGVDuUFFFZQ,3505
47
- esd_services_api_client/nexus/input/payload_reader.py,sha256=Kq0xN1Shyqv71v6YkcrqVTDbmsEjZc8ithsXYpyu87M,2516
47
+ esd_services_api_client/nexus/input/payload_reader.py,sha256=UKFDCqGxeiN9Lq2wpdpCTBGgRlGWnKLr72VTUWHO_HU,2677
48
48
  esd_services_api_client/nexus/modules/__init__.py,sha256=Ngdc35K63JnK1197oyXXHEcSNZXdV4CXBWoviDUeR5U,839
49
49
  esd_services_api_client/nexus/modules/astra_client_module.py,sha256=L8OhdSc7-BY2lnJi4f7FGwCYeBbQqLLo0nBZErRoPgY,1983
50
50
  esd_services_api_client/nexus/modules/mlflow_module.py,sha256=d4y8XetGF37md4dEpEO0CFPj2lDmK_f6LspUm4dRAW4,1331
51
51
  esd_services_api_client/nexus/telemetry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
52
  esd_services_api_client/nexus/telemetry/recorder.py,sha256=-shxk2vYDTafJ0U3CzkHxIHBQtxVJ1ZNI4ST0p1YV2g,4801
53
- esd_services_api_client/nexus/telemetry/user_telemetry_recorder.py,sha256=NgnjSY64nEx1kslkdomENC6vMqkEOpfXggJXwm-NyFs,5163
54
- esd_services_api_client-2.6.1a149.dev16.dist-info/LICENSE,sha256=0gS6zXsPp8qZhzi1xaGCIYPzb_0e8on7HCeFJe8fOpw,10693
55
- esd_services_api_client-2.6.1a149.dev16.dist-info/METADATA,sha256=MbvzM7gfqB2deZrKJyDW1zdGRrMCUWmbA1-a7dkCuAA,1068
56
- esd_services_api_client-2.6.1a149.dev16.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
57
- esd_services_api_client-2.6.1a149.dev16.dist-info/RECORD,,
53
+ esd_services_api_client/nexus/telemetry/user_telemetry_recorder.py,sha256=_fARqlRLuJGzIbwuadEwiLCGYRSCyrIn2DG2iNZBPpk,5215
54
+ esd_services_api_client-2.6.2a150.dev14.dist-info/LICENSE,sha256=0gS6zXsPp8qZhzi1xaGCIYPzb_0e8on7HCeFJe8fOpw,10693
55
+ esd_services_api_client-2.6.2a150.dev14.dist-info/METADATA,sha256=ywtA0isIXDugYfkgiMYrTxHWAu7i1S6JwzznImw_Z1w,1068
56
+ esd_services_api_client-2.6.2a150.dev14.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
57
+ esd_services_api_client-2.6.2a150.dev14.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.2
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any