issue-tracking icon indicating copy to clipboard operation
issue-tracking copied to clipboard

`log_image` uploading images with the same name

Open george-gca opened this issue 2 years ago • 3 comments

Describe the Bug

I am uploading multiple images from my code during the eval phase, but sometimes it handles the same image in another iteration. Since it is the same image, and I set the parameter overwrite on log_image to False and I am not associating any step to it, I figured that it wouldn't upload the same image again. But it is.

Expected behavior

Avoid uploading the same image again since it has the same name and no step.

Where is the issue?

  • [X] Comet Python SDK
  • [ ] Comet UI
  • [ ] Third Party Integrations (Huggingface, TensorboardX, Pytorch Lighting etc)

Screenshots or GIFs

image

Additional context

I realized that probably it is doing that because the Context metadata of the images are different. But how do I avoid this?

image

image

george-gca avatar Apr 11 '22 20:04 george-gca

Hi @george-gca. Would you be able to tell me what you mean by handling the same image in another iteration? Is there a specific reason you have set overwrite=False

DN6 avatar Apr 12 '22 13:04 DN6

@DN6 sure. Currently I am working with visual question answering, so basically there is an image, and a text question associated with it. I'd like to log to comet the image, question, and resulting answer.

The problem is, sometimes I can have multiple questions associated with the same image, so I end up uploading the same image over and over. I thought that the overwrite=False parameter would avoid uploading the same image again, since it would figure that the image is already in the server because it has the same name and step associated with it (which is None).

george-gca avatar Apr 12 '22 14:04 george-gca

Also facing this issue while logging images! Happy to provide any logs/code/etc. if needed.

Edit: This was a bug in my code. My training/validation/testing split were calling the same visualization function without changing the name. Issue resolved!

atharvas avatar Jul 28 '22 16:07 atharvas

Thanks for reporting back!

dsblank avatar Oct 18 '23 15:10 dsblank