I’ve encountered a bit of an interesting issue when converting annotated P&IDs to SVG files using this endpoint from the Python SDK:
cognite_client.diagrams.convert(diagram_detect_results)
If I send in one file at a time then it works as expected:

But if I try to upload convert them at the same time then the annotations switch over for some reason. The annotation mapped to file_1 are shown on file_2 and vice versa. This also scales, but is a lot easier to demonstrate with just two files:

I’ve attached the diagram detect results that I send in to the API, and I can’t see any reason why this would happen. This makes parallelization somewhat difficult as we need to convert each file individually to ensure correctness.
Attachments:
daigram_res.txt contains both files at once
daigram_res_1.txt and diagram_res_2.txt contains each file as separate entities