space-engineers-ai-spaceship-generator icon indicating copy to clipboard operation
space-engineers-ai-spaceship-generator copied to clipboard

SpaceshipGenerator iteration issue (memory error)

Open Reflexbull opened this issue 1 year ago β€’ 10 comments

Issue type: Choose from [ bug | feature request ] Bug

Severity: Suggest one from [low | medium | high (application-breaking) ] High (Application-Breaking) -> in terms, the iterations don't work anymore, nothing is happening and it appears I would have to quit the app and reopen it again in order to make new iterations

Describe the issue A clear and concise description of what the bug is. I ran 10 iterations of the ships, then I ran 10 more (20 total) and then I ran 10 more, the 3rd time I ran 10 iterations, I got stuck on 8/10 and got errors which I will provide in the screenshots.

To Reproduce Steps to reproduce the behavior: Described above.

Expected behavior A clear and concise description of what you expected to happen. Well I expected those 10 iterations to finish and give me a new spaceship.

Screenshots If applicable, please add screenshots to help explain your problem, they tremendously help understanding the issue. scr1 scr2

**Note -> I don't understand what a memory error is, but I have more than enough RAM, VRAM and SSD/HDD space if that's the case. (RTX 3070, 32 (2x16) GB 3200 MHz ram and C disk SSD with 95 GB space left, E disk HDD with 705 GB space left).

Log file In case of bugs, please upload the relevant log file (log_{TIMESTAMP}.log) for inspection. The log file does not contain any user information if the user declined the privacy policy or have already completed the user study. I don't have it? I need more info on where to find it, as I started the .exe from downloads folder, and I have too much stuff there, but under the name "log_{TIMESTAMP}.log" I can't find anything, I looked in temp folder also, nothing there.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • .exe file name: AI.Spaceship.Generator.v1.0.0.exe

Additional context Add any other context about the problem here. Just to mention, I am sorry if I got something wrong and/or are wasting your time with this issue, but considering the fact that first 20 iterations ran without problem, I think this was worth mentioning?

Reflexbull avatar Oct 28 '22 07:10 Reflexbull

@Reflexbull that's a lot of spaceships per iteration πŸ˜… Thank you for the accurate bug report, this is most likely due to having too many spaceships that are very very large all at once.

I will update the application to try and improve memory usage--for now however I would suggest reducing the iterations from 10 to 7 or 5.

PS: log files location should be fixed with the next release, sorry for the confusion.

gallorob avatar Oct 28 '22 08:10 gallorob

@gallorob well, go big or go home :D gotta test the app to give you all the info on improvement/bugs etc. :) I will try to go to 7 iterations and see if I encounter the bug again, thanks! 1 more question though, it was said on the stream that we can choose a block which the generation will be based on (in terms of symmetry), I still don't know how to do it, is there a guide or something else that I can look upon? I really like the idea of having a symmetrical ship and I would love to do my future iterations based on that.

Reflexbull avatar Oct 28 '22 08:10 Reflexbull

@Reflexbull yes, the symmetry is available in developer mode. This is still being tidied up, and will be fully functional before the end of the user study (end of November), so any issue regarding it will be momentarily ignored.

If you want to check it out anyways, add the "--dev_mode" flag to the executable or the python launch command: AI.Spaceship.Generator.v1.0.0.exe --dev_mode or python main_webapp_launcher.py --dev_mode

Note that you will have to upload a population to start evolving--there are populations in the source code, named mapelites_*.json.

Happy evolution! πŸ˜„

gallorob avatar Oct 28 '22 08:10 gallorob

thanks a lot for your help! Until next time :)

Reflexbull avatar Oct 28 '22 08:10 Reflexbull

Hi @gallorob, me againπŸ˜… Coming with a new error which is still related to memory ( if I see it correctly )

Issue type: Choose from [ bug | feature request ] Bug

Severity: Suggest one from [low | medium | high (application-breaking) ] High (Application-Breaking) -> in terms, the iterations don't work anymore, nothing is happening and it appears I would have to quit the app and reopen it again in order to make new iterations

Describe the issue A clear and concise description of what the bug is. I ran 7 iterations of the ships, then I ran 7 more (14 total) and then I ran 7 more, the 3rd time I ran 10 iterations, I got stuck on 1/7 and got errors which I will provide in the screenshots.

To Reproduce Steps to reproduce the behavior: Described above.

Expected behavior A clear and concise description of what you expected to happen. Well I expected those 7 iterations to finish and give me a new spaceship.

Screenshots If applicable, please add screenshots to help explain your problem, they tremendously help understanding the issue. scr1 scr2

Desktop (please complete the following information):

OS: Windows Browser: Chrome .exe file name: AI.Spaceship.Generator.v1.0.0.exe

PS: I'm interested where on my system disk is this all saved? Which folder? I noticed my system disk space went from 103 GB to 77 GB after 2 iterations, I doubt it would go over 77 GB for 3rd one? And when I closed the application, it went back to 103 GB.

Reflexbull avatar Oct 28 '22 09:10 Reflexbull

Hi @Reflexbull, this time it's pretty clear that the spaceship is too large and the program could not allocate 7.38GiB of RAM for it, so I'll add a failsafe for this kind of issue as well. I don't think I'll be able to work on this before Monday, so I'll let you know then.

Maybe try your luck with setting the iterations to 5? This way maybe it will crash on the 4th or 5th generation instead of the 3rd πŸ˜… Jokes aside, hopefully I can get this fixed soon and you can resume evolving new spaceships!

As for the disk space: the executable extracts the relevant files (dlls mainly) in a temporary folder, which is then cleared once the application is closed. The spaceships themselves are not saved on disk during the evolution, unless you explicitly save the population or the MAP-Elites object (possible only in dev mode).

Let's keep this issue open for now.

gallorob avatar Oct 28 '22 10:10 gallorob

Thanks @gallorob for fast replies, take your time, for me personally, it's not a rush :) take as much time as you need to perfect it I'll try the 5 iteration one aswell, don't worry πŸ˜‚ And thanks for the file save location! Was wondering where it was... I'll get back to you after I try out the 5 iterations (if I get enough time today, that is)

Reflexbull avatar Oct 28 '22 11:10 Reflexbull

Hi @Reflexbull, I pushed fa65e4362865ece1cfd344c3a2ca55b52d9e3062 which adds some memory savings and should catch memory allocation errors without breaking the application πŸ˜…

Can you try stress-testing it again? And, if possible, attach the log file if it crashes again (the log file is generated in the same directory as the executable)? Thank you.

Are you able to run from source? If not, I will release these updates in https://github.com/GoodAI/space-engineers-ai-spaceship-generator/releases/tag/internal-testing so you can test it.

gallorob avatar Oct 31 '22 01:10 gallorob

Hello @gallorob ! To be fair, I never used github so I'm not familiar with pushing and pulling, that saying, I'll just click on the link you provided at the bottom :D I'll stress test again and get back to you. Also, I tried 5 iterations, I was able to get past 3rd generation, but then it broke on the 4th... No error or anything, just stuck on the same text, and nothing is happening.

Reflexbull avatar Oct 31 '22 20:10 Reflexbull

Hi @Reflexbull, I've updated the release (same link as before, https://github.com/GoodAI/space-engineers-ai-spaceship-generator/releases/tag/internal-testing) to include the memory-related changes. Looking forward to your testing, let me know how that goes!

PS: you can now also play around with symmetry in user mode πŸ˜‰

gallorob avatar Nov 01 '22 00:11 gallorob

Closing this issue for inactivity (>1 month, no additional reports of a similar issue).

gallorob avatar Dec 12 '22 14:12 gallorob