Skip to content

[WIP] Fix image embedding computation error#77

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/fix-image-embedding-issue
Closed

[WIP] Fix image embedding computation error#77
Copilot wants to merge 1 commit intomainfrom
copilot/fix-image-embedding-issue

Conversation

Copy link

Copilot AI commented Mar 6, 2026

Cloud agent has begun work on Tell me what is goin... and will update this pull request as work progresses.

Original prompt

Tell me what is going on

Embeddings computed. Shape: (1478, 768)
Embedding this many images: 1843
Processing Images
Traceback (most recent call last):
File "/workspace/scripts/python_helpers/run_embedding_pipeline.py", line 340, in
main()
File "/workspace/scripts/python_helpers/run_embedding_pipeline.py", line 282, in main
process_pdfs(
File "/workspace/scripts/python_helpers/run_embedding_pipeline.py", line 39, in process_pdfs
pdf_to_txt_img_time, text_embed_time, img_embed_time = processor.pdfs_to_embeddings(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/govscape/govscape/pdf_to_embed.py", line 379, in pdfs_to_embeddings
self.compute_image_embeddings()
File "/workspace/govscape/govscape/pdf_to_embed.py", line 350, in compute_image_embeddings
emb = self.visual_model.encode_images(img_paths)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/govscape/govscape/visual_embedding_models.py", line 163, in encode_images
batch_tensors = pool.starmap(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/multiprocessing/pool.py", line 375, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/multiprocessing/pool.py", line 774, in get
raise self._value
multiprocessing.pool.MaybeEncodingError: Error sending result: '[tensor([[[[1.9303, 1.9303, 1.9303, ..., 1.9303, 1.9303, 1.9303],
[1.9303, 1.9303, 1.9303, ..., 1.9303, 1.9303, 1.9303],
[1.9303, 1.9303, 1.9303, ..., 1.9303, 1.9303, 1.9303],
...,
[1.9303, 1.9303, 1.9303, ..., 1.9303, 1.9303, 1.9303],
[1.9303, 1.9303, 1.9303, ..., 1.9303, 1.9303, 1.9303],
[1.9303, 1.9303, 1.9303, ..., 1.9303, 1.9303, 1.9303]],

     [[2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      ...,
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749]],

     [[2.1459, 2.1459, 2.1459,  ..., 2.1459, 2.1459, 2.1459],
      [2.1459, 2.1459, 2.1459,  ..., 2.1459, 2.1459, 2.1459],
      [2.1459, 2.1459, 2.1459,  ..., 2.1459, 2.1459, 2.1459],
      ...,
      [2.1459, 2.1459, 2.1459,  ..., 2.1459, 2.1459, 2.1459],
      [2.1459, 2.1459, 2.1459,  ..., 2.1459, 2.1459, 2.1459],
      [2.1459, 2.1459, 2.1459,  ..., 2.1459, 2.1459, 2.1459]]],


    [[[1.9303, 1.9303, 1.9303,  ..., 1.9303, 1.9303, 1.9303],
      [1.9303, 1.9303, 1.9303,  ..., 1.9303, 1.9303, 1.9303],
      [1.9303, 1.9303, 1.9303,  ..., 1.9303, 1.9303, 1.9303],
      ...,
      [1.9303, 1.9303, 1.9303,  ..., 1.9303, 1.9303, 1.9303],
      [1.9303, 1.9303, 1.9303,  ..., 1.9303, 1.9303, 1.9303],
      [1.9303, 1.9303, 1.9303,  ..., 1.9303, 1.9303, 1.9303]],

     [[2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      ...,
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749]],

     [[2.1459, 2.1459, 2.1459,  ..., 2.1459, 2.1459, 2.1459],
      [2.1459, 2.1459, 2.1459,  ..., 2.1459, 2.1459, 2.1459],
      [2.1459, 2.1459, 2.1459,  ..., 2.1459, 2.1459, 2.1459],
      ...,
      [2.1459, 2.1459, 2.1459,  ..., 2.1459, 2.1459, 2.1459],
      [2.1459, 2.1459, 2.1459,  ..., 2.1459, 2.1459, 2.1459],
      [2.1459, 2.1459, 2.1459,  ..., 2.1459, 2.1459, 2.1459]]],


    [[[1.9303, 1.9303, 1.9303,  ..., 1.9303, 1.9303, 1.9303],
      [1.9303, 1.9303, 1.9303,  ..., 1.9303, 1.9303, 1.9303],
      [1.9303, 1.9303, 1.9303,  ..., 1.9303, 1.9303, 1.9303],
      ...,
      [1.9303, 1.9303, 1.9303,  ..., 1.9303, 1.9303, 1.9303],
      [1.9303, 1.9303, 1.9303,  ..., 1.9303, 1.9303, 1.9303],
      [1.9303, 1.9303, 1.9303,  ..., 1.9303, 1.9303, 1.9303]],

     [[2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      ...,
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749],
      [2.0749, 2.0749, 2.0749,  ..., 2.0749, 2.0749, 2.0749]],

     [[2.1459, 2.1459, 2.1459,  ..., 2.1459, 2.1459, 2.1459],
      [2.1459, 2.1459, 2.1459,  ..., 2.1459, 2.1459, 2.1459],
      [2.1459, 2.1459, 2.1459,  ..., 2.1459,...

Created from VS Code.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@albert-du albert-du closed this Mar 6, 2026
@albert-du albert-du deleted the copilot/fix-image-embedding-issue branch March 6, 2026 22:13
Copilot stopped work on behalf of albert-du due to an error March 6, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants