esd-services-api-client 2.2.1__py3-none-any.whl → 2.2.2__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/_version.py +1 -1
- esd_services_api_client/crystal/_connector.py +4 -0
- esd_services_api_client/crystal/_models.py +12 -0
- esd_services_api_client/nexus/telemetry/recorder.py +20 -12
- {esd_services_api_client-2.2.1.dist-info → esd_services_api_client-2.2.2.dist-info}/METADATA +1 -1
- {esd_services_api_client-2.2.1.dist-info → esd_services_api_client-2.2.2.dist-info}/RECORD +8 -8
- {esd_services_api_client-2.2.1.dist-info → esd_services_api_client-2.2.2.dist-info}/LICENSE +0 -0
- {esd_services_api_client-2.2.1.dist-info → esd_services_api_client-2.2.2.dist-info}/WHEEL +0 -0
| @@ -1 +1 @@ | |
| 1 | 
            -
            __version__ = '2.2. | 
| 1 | 
            +
            __version__ = '2.2.2'
         | 
| @@ -37,6 +37,7 @@ from esd_services_api_client.crystal._models import ( | |
| 37 37 | 
             
                AlgorithmRequest,
         | 
| 38 38 | 
             
                AlgorithmConfiguration,
         | 
| 39 39 | 
             
                RequestLifeCycleStage,
         | 
| 40 | 
            +
                ParentRequest,
         | 
| 40 41 | 
             
            )
         | 
| 41 42 |  | 
| 42 43 | 
             
            T = TypeVar("T")  # pylint: disable=C0103
         | 
| @@ -154,6 +155,7 @@ class CrystalConnector: | |
| 154 155 | 
             
                    algorithm: str,
         | 
| 155 156 | 
             
                    payload: Dict,
         | 
| 156 157 | 
             
                    custom_config: Optional[AlgorithmConfiguration] = None,
         | 
| 158 | 
            +
                    parent_request: Optional[ParentRequest] = None,
         | 
| 157 159 | 
             
                    tag: Optional[str] = None,
         | 
| 158 160 | 
             
                ) -> str:
         | 
| 159 161 | 
             
                    """
         | 
| @@ -162,6 +164,7 @@ class CrystalConnector: | |
| 162 164 | 
             
                    :param algorithm: Name of a connected algorithm.
         | 
| 163 165 | 
             
                    :param payload: Algorithm payload.
         | 
| 164 166 | 
             
                    :param custom_config: Customized config for this run.
         | 
| 167 | 
            +
                    :param parent_request: Parent request for this run.
         | 
| 165 168 | 
             
                    :param tag: Client-side submission identifier.
         | 
| 166 169 | 
             
                    :return: Request identifier assigned to the job by Crystal.
         | 
| 167 170 | 
             
                    """
         | 
| @@ -176,6 +179,7 @@ class CrystalConnector: | |
| 176 179 | 
             
                        algorithm_name=algorithm,
         | 
| 177 180 | 
             
                        algorithm_parameters=payload,
         | 
| 178 181 | 
             
                        custom_configuration=custom_config,
         | 
| 182 | 
            +
                        parent_request=parent_request,
         | 
| 179 183 | 
             
                        tag=tag,
         | 
| 180 184 | 
             
                    ).to_dict()
         | 
| 181 185 |  | 
| @@ -133,6 +133,17 @@ class AlgorithmConfiguration(DataClassJsonMixin): | |
| 133 133 | 
             
                speculative_attempts: Optional[int] = None
         | 
| 134 134 |  | 
| 135 135 |  | 
| 136 | 
            +
            @dataclass_json(letter_case=LetterCase.CAMEL)
         | 
| 137 | 
            +
            @dataclass
         | 
| 138 | 
            +
            class ParentRequest(DataClassJsonMixin):
         | 
| 139 | 
            +
                """
         | 
| 140 | 
            +
                Used to specify crystal parent job for a new crystal job.
         | 
| 141 | 
            +
                """
         | 
| 142 | 
            +
             | 
| 143 | 
            +
                request_id: Optional[str] = None
         | 
| 144 | 
            +
                algorithm_name: Optional[str] = None
         | 
| 145 | 
            +
             | 
| 146 | 
            +
             | 
| 136 147 | 
             
            @dataclass_json(letter_case=LetterCase.CAMEL)
         | 
| 137 148 | 
             
            @dataclass
         | 
| 138 149 | 
             
            class AlgorithmRequest(DataClassJsonMixin):
         | 
| @@ -143,4 +154,5 @@ class AlgorithmRequest(DataClassJsonMixin): | |
| 143 154 | 
             
                algorithm_parameters: Dict
         | 
| 144 155 | 
             
                algorithm_name: Optional[str] = None
         | 
| 145 156 | 
             
                custom_configuration: Optional[AlgorithmConfiguration] = None
         | 
| 157 | 
            +
                parent_request: Optional[ParentRequest] = None
         | 
| 146 158 | 
             
                tag: Optional[str] = None
         | 
| @@ -59,18 +59,26 @@ class TelemetryRecorder(NexusCoreObject): | |
| 59 59 | 
             
                            entity_name=entity_name,
         | 
| 60 60 | 
             
                            run_id=run_id,
         | 
| 61 61 | 
             
                        )
         | 
| 62 | 
            -
                         | 
| 63 | 
            -
                             | 
| 64 | 
            -
             | 
| 65 | 
            -
             | 
| 66 | 
            -
                                 | 
| 67 | 
            -
                                 | 
| 68 | 
            -
                            ) | 
| 69 | 
            -
             | 
| 70 | 
            -
                             | 
| 71 | 
            -
             | 
| 72 | 
            -
             | 
| 73 | 
            -
             | 
| 62 | 
            +
                        if not isinstance(entity_to_record, dict) and not isinstance(
         | 
| 63 | 
            +
                            entity_to_record, pd.DataFrame
         | 
| 64 | 
            +
                        ):
         | 
| 65 | 
            +
                            self._logger.warning(
         | 
| 66 | 
            +
                                "Unsupported data type: {telemetry_entity_type}. Telemetry recording skipped.",
         | 
| 67 | 
            +
                                telemetry_entity_type=type(entity_to_record),
         | 
| 68 | 
            +
                            )
         | 
| 69 | 
            +
                        else:
         | 
| 70 | 
            +
                            self._storage_client.save_data_as_blob(
         | 
| 71 | 
            +
                                data=entity_to_record,
         | 
| 72 | 
            +
                                blob_path=DataSocket(
         | 
| 73 | 
            +
                                    alias="telemetry",
         | 
| 74 | 
            +
                                    data_path=f"{self._telemetry_base_path}/{entity_name}/{run_id}",
         | 
| 75 | 
            +
                                    data_format="null",
         | 
| 76 | 
            +
                                ).parse_data_path(),
         | 
| 77 | 
            +
                                serialization_format=DictJsonSerializationFormat
         | 
| 78 | 
            +
                                if isinstance(entity_to_record, dict)
         | 
| 79 | 
            +
                                else DataFrameParquetSerializationFormat,
         | 
| 80 | 
            +
                                overwrite=True,
         | 
| 81 | 
            +
                            )
         | 
| 74 82 |  | 
| 75 83 | 
             
                    telemetry_tasks = [
         | 
| 76 84 | 
             
                        asyncio.create_task(
         | 
| @@ -1,5 +1,5 @@ | |
| 1 1 | 
             
            esd_services_api_client/__init__.py,sha256=L-cEW1mVbnTJLCLG5V6Ucw7zBgx1zf0t1bYcQC1heyw,603
         | 
| 2 | 
            -
            esd_services_api_client/_version.py,sha256 | 
| 2 | 
            +
            esd_services_api_client/_version.py,sha256=jsJ9CNIuUt8dDFB4i0PiBf07nzBU0RtG1CVRQ7TdoQ0,22
         | 
| 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 5 | 
             
            esd_services_api_client/beast/v3/_connector.py,sha256=WNmCiTXFRb3q56mrr7ZbqBHWDUxbfyWhiWlBFLUIOnc,11478
         | 
| @@ -13,8 +13,8 @@ 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= | 
| 17 | 
            -
            esd_services_api_client/crystal/_models.py,sha256= | 
| 16 | 
            +
            esd_services_api_client/crystal/_connector.py,sha256=U2cmgmOhXtKWlDljg8G20W4pTBOjgfb-F4gH7AgXBYg,13053
         | 
| 17 | 
            +
            esd_services_api_client/crystal/_models.py,sha256=4ZizNNfMij31eV87cOog724gJWGWgfQAiKJ1nHKlNw0,4338
         | 
| 18 18 | 
             
            esd_services_api_client/nexus/README.md,sha256=QQgvkhRwZtktxlzTmHkbp8KNnUvDvFGEVqvSM1QgpU8,9393
         | 
| 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
         | 
| @@ -45,8 +45,8 @@ esd_services_api_client/nexus/input/input_processor.py,sha256=vqzeQrtRFqBKTPSEiW | |
| 45 45 | 
             
            esd_services_api_client/nexus/input/input_reader.py,sha256=aXNMGxrdUX5RDYR666GSGkcZqYMFYoZ8zGVDuUFFFZQ,3505
         | 
| 46 46 | 
             
            esd_services_api_client/nexus/input/payload_reader.py,sha256=Kq0xN1Shyqv71v6YkcrqVTDbmsEjZc8ithsXYpyu87M,2516
         | 
| 47 47 | 
             
            esd_services_api_client/nexus/telemetry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         | 
| 48 | 
            -
            esd_services_api_client/nexus/telemetry/recorder.py,sha256= | 
| 49 | 
            -
            esd_services_api_client-2.2. | 
| 50 | 
            -
            esd_services_api_client-2.2. | 
| 51 | 
            -
            esd_services_api_client-2.2. | 
| 52 | 
            -
            esd_services_api_client-2.2. | 
| 48 | 
            +
            esd_services_api_client/nexus/telemetry/recorder.py,sha256=P6DDr6cQ9FYTZhgY1YMzez0Y6c6ac2FnYktapNssyJo,3644
         | 
| 49 | 
            +
            esd_services_api_client-2.2.2.dist-info/LICENSE,sha256=0gS6zXsPp8qZhzi1xaGCIYPzb_0e8on7HCeFJe8fOpw,10693
         | 
| 50 | 
            +
            esd_services_api_client-2.2.2.dist-info/METADATA,sha256=IQRjdfLWt5AZ89_7w-iHJuvglGwPcFhUYwtMewJVL64,1292
         | 
| 51 | 
            +
            esd_services_api_client-2.2.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
         | 
| 52 | 
            +
            esd_services_api_client-2.2.2.dist-info/RECORD,,
         | 
| 
            File without changes
         | 
| 
            File without changes
         |