wandb
wandb copied to clipboard
[App]: Can't see logged images in charts UI
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
Hi @furkan-celik,
Could you share a link to the project where this happens for you? I'll have a look.
Thanks, Ramit
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
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
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.
I had the same issue. Images are not showing in Media section.
Hi Nobita,
Could you share the following information -
- A link to your project page
- The version of
wandb
you are currently using - If possible, a minimal code snippet reproducing this issue?
I'll have a look into this for you
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.
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.
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
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.
​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.
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
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
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
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
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
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!