Hello Everyone! (Long time user, first time poster )
I just started using WandB tables to log my predictions alongside their input images. It has been very useful so far. My problem arises when I run my code on a cluster we have at my university.
For simplicity, let’s say that every epoch, I am logging a table with the following columns: [id, Image, prediction]
which is a list of [string, wandb.Image, int]
.
Every time wandb.Image()
is called, it saves the image employing the PIL library (can be seen below). My problem arises when, after a certain number of epochs, I run into memory problems:
Traceback (most recent call last):
File "/mnt/gpid07/imatge/carlos.hernandez/Documents/PhD/2021/marato-derma/derma/sol/cnn_recommendations/processing/train_utils.py", line 206, in log_wandb_table
row = [img_id, wandb.Image(image),
File "/mnt/gpid07/imatge/carlos.hernandez/Documents/base/lib/python3.6/site-packages/wandb/sdk/data_types.py", line 1587, in __init__
self._initialize_from_data(data_or_path, mode)
File "/mnt/gpid07/imatge/carlos.hernandez/Documents/base/lib/python3.6/site-packages/wandb/sdk/data_types.py", line 1700, in _initialize_from_data
self._image.save(tmp_path, transparency=None)
File "/mnt/gpid07/imatge/carlos.hernandez/Documents/base/lib/python3.6/site-packages/PIL/Image.py", line 2102, in save
save_handler(self, fp, filename)
File "/mnt/gpid07/imatge/carlos.hernandez/Documents/base/lib/python3.6/site-packages/PIL/PngImagePlugin.py", line 900, in _save
ImageFile._save(im, _idat(fp, chunk), [("zip", (0, 0) + im.size, 0, rawmode)])
File "/mnt/gpid07/imatge/carlos.hernandez/Documents/base/lib/python3.6/site-packages/PIL/ImageFile.py", line 511, in _save
fp.write(d)
File "/mnt/gpid07/imatge/carlos.hernandez/Documents/base/lib/python3.6/site-packages/PIL/PngImagePlugin.py", line 748, in write
self.chunk(self.fp, b"IDAT", data)
File "/mnt/gpid07/imatge/carlos.hernandez/Documents/base/lib/python3.6/site-packages/PIL/PngImagePlugin.py", line 735, in putchunk
fp.write(data)
OSError: [Errno 28] No space left on device
I was wondering if Tables allow only to update specific columns. The id
and Image
remain constant for the entire training, the only values that I am interested in their evolution are the predictions.
Has anyone encountered a similar problem? Any ideas on how to shortcut my lack of memory would be welcome!