wandb icon indicating copy to clipboard operation
wandb copied to clipboard

[App]: Can't see logged images in charts UI

Open furkan-celik opened this issue 2 years ago • 14 comments

Current Behavior

I am using wandb to report my generative model's progress. With a fixed intervals of steps (let's say for every 100 epoch), I want to log a set of sampled images. However, when I run the code below for this, generated images are saved as a file in the wandb web app instead of showing up as a part of UI. How can I fix this?

I also tried to submit images by giving each a different label and giving them as an array but both versions doesn't solve the issue.

wandb.log({f"examples_{i}": wandb.Image(image) for i, image in enumerate(images)}, step=self.step + self.resume_step) wandb.log({"examples": [wandb.Image(image) for i, image in enumerate(images)]}, step=self.step + self.resume_step)

Expected Behavior

I am expecting to see results in UI as I can see on the tutorials.

Steps To Reproduce

No response

Screenshots

No response

Environment

OS: Docker ubuntu_20.04

Browsers: Chrome 102

Version: wandb version is 0.12.19 (Python)

Additional Context

No response

furkan-celik avatar Jun 27 '22 19:06 furkan-celik

Hi @furkan-celik,

Could you share a link to the project where this happens for you? I'll have a look.

Thanks, Ramit

RamitGoolry avatar Jun 28 '22 20:06 RamitGoolry

WandB Internal User commented: RamitGoolry commented: Hi @furkan-celik,

Could you share a link to the project where this happens for you? I'll have a look.

Thanks, Ramit

exalate-issue-sync[bot] avatar Jun 28 '22 20:06 exalate-issue-sync[bot]

Hi,

Thank you for reaching out. However, since the project is private, I wouldn't prefer to disclose it over a public medium. Is it possible to provide it over a secure/private medium?

Thank you

furkan-celik avatar Jun 28 '22 21:06 furkan-celik

Absolutely! You can reach out at [email protected] and we can continue the conversation there! I'll close out this issue for now and will follow up on your email. Please link to this issue in your email.

ramit-wandb avatar Jul 05 '22 19:07 ramit-wandb

I had the same issue. Images are not showing in Media section.

phtu-cs avatar Jul 09 '22 19:07 phtu-cs

Hi Nobita,

Could you share the following information -

  1. A link to your project page
  2. The version of wandb you are currently using
  3. If possible, a minimal code snippet reproducing this issue?

I'll have a look into this for you

ramit-wandb avatar Jul 12 '22 19:07 ramit-wandb

Hi @furkan-celik, Looks like your images might not be being logged because they never reach the condition to log. The frequency of logging is set to 100, but I can see for some of your runs they stop earlier. Are you calling wandb.save on these images? This would explain why they show up in the files tab. I would recommend increasing the frequency of logging to make sure that they do log correctly.

If this is an issue after setting the frequency to log more frequently too, please let me know and I will look further into this.

ramit-wandb avatar Jul 13 '22 21:07 ramit-wandb

Do I need to call wandb.save() explicitly? I thought having wandb.log() is enough. And even if I go into a run with images, there is no image pane that I can add.

We can't do anything about making sure runs log images because some of them runs out of memory before 0th step completed. We are already logging some images after first step is finished but memory needs adjustment over several step. If having runs without reported images causes this issue we may look for alternative workarounds.

furkan-celik avatar Jul 13 '22 21:07 furkan-celik

wandb.log({f"examples_{i}": wandb.Image(image) for i, image in enumerate(images)}, step=self.step + self.resume_step) wandb.log({"examples": [wandb.Image(image) for i, image in enumerate(images)]}, step=self.step + self.resume_step)

These are just code snippets for logging images as I said earlier and we only call wandb.save over detailed log files

furkan-celik avatar Jul 13 '22 21:07 furkan-celik

Yup, what I mean is it looks like a call to wandb.save() is being made but wandb.log() is not. You do not need to call save() to log images.

ramit-wandb avatar Jul 21 '22 22:07 ramit-wandb

​Hi @furkan-celik,

We wanted to follow up with you regarding your support request as we have not heard back from you. Please let us know if we can be of further assistance or if your issue has been resolved.

ramit-wandb avatar Jul 28 '22 17:07 ramit-wandb

Hi,

No it didn't help. As I stated, and sent the code snippets, I am not using wandb.save but rather wandb.log for images. And wandb.save for log files. So, I am following tutorials just fine but it is not happening. I am not very impressed by having this issue.

Thank you

furkan-celik avatar Jul 28 '22 21:07 furkan-celik

I see. In that case, is it possible for you to send over a repository with the code you are running? I'll have to look at what is happening here, otherwise the best I can do is just guess.

Thanks, Ramit

ramit-wandb avatar Aug 03 '22 00:08 ramit-wandb

Here is our repo, it is a bit hard to run due to distributed learning. So we are running scripts/image_train.py which calls guided_diffusion/train_util.py. From here you can see corresponding code for image logging. There is also logging happening at logger.py which is called at various points of execution. In terms of wandb calls, at the start of execution wandb.save is called at logger.py:483 and then next call is several wandb.log calls on metrics at logger.py:358, logger.py:366 and train_util.py:462. After metrics are logged then we go to inside the if at train_util.py:249-283 where image is logged. Hope this helps for you to understand the issue.

https://github.com/murilobellatini/mlmi-oct-diffusion

furkan-celik avatar Aug 03 '22 07:08 furkan-celik

WandB Internal User commented: furkan-celik commented: Here is our repo, it is a bit hard to run due to distributed learning. So we are running scripts/image_train.py which calls guided_diffusion/train_util.py. From here you can see corresponding code for image logging. There is also logging happening at logger.py which is called at various points of execution. In terms of wandb calls, at the start of execution wandb.save is called at logger.py:483 and then next call is several wandb.log calls on metrics at logger.py:358, logger.py:366 and train_util.py:462. After metrics are logged then we go to inside the if at train_util.py:249-283 where image is logged. Hope this helps for you to understand the issue.

https://github.com/murilobellatini/mlmi-oct-diffusion

exalate-issue-sync[bot] avatar Aug 08 '22 18:08 exalate-issue-sync[bot]

Hi @furkan-celik,

Thank you for your patience, we have had a few updates since the last time, could you upgrade your SDK and try again? I looked through your repo, but unfortunately I will not be able to run it due to the resources required to run this. I would suggest setting up some internal logging in your repository as well.

Thanks, Ramit

ramit-wandb avatar Sep 12 '22 18:09 ramit-wandb

Hi @furkan-celik, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

ramit-wandb avatar Sep 15 '22 21:09 ramit-wandb