shyamsn97 / mario-gpt

[Neurips 2023] Generating Mario Levels with GPT2. Code for the paper "MarioGPT: Open-Ended Text2Level Generation through Large Language Models" https://arxiv.org/abs/2302.05981
https://huggingface.co/shyamsn97/Mario-GPT2-700-context-length
MIT License
1.11k stars 103 forks source link

Failed to evaluate! 'TensorBoardTracker' object has no attribute 'add_image' #27

Closed Logan-lxw closed 6 months ago

Logan-lxw commented 1 year ago

I think I meet one problem about evaluation.I am looking forward to your help.

tracker = self.accelerator.get_tracker("tensorboard")
        tracker.add_image(
            "image", np.array(out.img), i, dataformats="HWC"
        )
except Exception as e:
    print("Failed to evaluate!", e)

Besides,I can always see this output during the trainning process,should I deal with this problem?

REPLACING <PIL.PngImagePlugin.PngImageFile image mode=RGB size=16x16 at 0x16D2A446C10> (96, 13)
REPLACING <PIL.PngImagePlugin.PngImageFile image mode=RGB size=16x16 at 0x16D2A446C10> (97, 13)
REPLACING <PIL.PngImagePlugin.PngImageFile image mode=RGB size=16x16 at 0x16D2A446C10> (98, 13)
REPLACING <PIL.PngImagePlugin.PngImageFile image mode=RGB size=16x16 at 0x16D2A446C10> (99, 13)
REPLACING <PIL.PngImagePlugin.PngImageFile image mode=RGB size=16x16 at 0x16D2A446C10> (100, 13)

Thank you!

shyamsn97 commented 1 year ago

Hey! This is actually expected behavior. Basically, the model in the beginning of training outputs some random characters for tiles. If this happens, we want to replace those tiles with some blank ones so that we can actually display the level