Avalon-Benchmark / avalon

A 3D video game environment and benchmark designed from scratch for reinforcement learning research
https://generallyintelligent.com/avalon/
GNU General Public License v3.0
175 stars 16 forks source link

Error occurs in Generate_world when following Mac/Ubuntu instructions #19

Closed leemiinseung closed 1 year ago

leemiinseung commented 1 year ago

Hello. I'm trying to install and test avalon-rl on both local MAC (m1) and headless server (Ubuntu-18.0.4, 20.0.4) environment. (I'm working on conda) I followed the installation instructions but they return same error like: (In Mac)

2023-01-19 16:44:01.755 | ERROR    | avalon.datagen.world_creation.world_generator:generate_world:637 - Unspecified error in world generation, this was try 0... (reason: buffer source array is read-only)
2023-01-19 16:44:01.764 | ERROR    | avalon.datagen.world_creation.world_generator:generate_world:637 - Unspecified error in world generation, this was try 1... (reason: buffer source array is read-only)
2023-01-19 16:44:01.773 | ERROR    | avalon.datagen.world_creation.world_generator:generate_world:637 - Unspecified error in world generation, this was try 2... (reason: buffer source array is read-only)
2023-01-19 16:44:01.777 | ERROR    | avalon.datagen.world_creation.world_generator:generate_world:637 - Unspecified error in world generation, this was try 3... (reason: buffer source array is read-only)
2023-01-19 16:44:01.785 | ERROR    | avalon.datagen.world_creation.world_generator:generate_world:633 - Ran out of retries to generate a good world!
2023-01-19 16:44:01.785 | ERROR    | avalon.datagen.world_creation.world_generator:generate_world:634 - Params were: GenerateAvalonWorldParams(task=<AvalonTask.EAT: 'EAT'>, difficulty=0.0, seed=0, index=0, output='/var/folders/7d/4wzd69fn51dbr2z0d9y71vtc0000gn/T/science/data/level_gen/fe07b7c8-0560-49b0-ab0b-fd2a6b09176c/0', num_retries=5)
Caught error in _on_world_generation_error. This shouldn't happen!!!:
buffer source array is read-only

(In Ubuntu-18.0.4 and 20.0.4)

Unspecified error in world generation, this was try 0... (reason: buffer source array is read-only)
Unspecified error in world generation, this was try 0... (reason: buffer source array is read-only)
Unspecified error in world generation, this was try 1... (reason: buffer source array is read-only)
Unspecified error in world generation, this was try 2... (reason: buffer source array is read-only)
Unspecified error in world generation, this was try 1... (reason: buffer source array is read-only)
Unspecified error in world generation, this was try 3... (reason: buffer source array is read-only)
Ran out of retries to generate a good world!
Params were: GenerateAvalonWorldParams(task=<AvalonTask.EAT: 'EAT'>, difficulty=0.0, seed=0, index=0, output='/tmp/science/data/level_gen/59cd56e3-2069-42d3-ad37-d84889902b57/0', num_retries=5)
Unspecified error in world generation, this was try 2... (reason: buffer source array is read-only)
Caught error in _on_world_generation_error. This shouldn't happen!!!:
buffer source array is read-only
zplizzi commented 1 year ago

Can you try again on ubuntu with pip? We haven't tested conda. Also what python version are you using?

leemiinseung commented 1 year ago

python version is 3.9. I did not install avalon-rl with 'conda install' command (I exactly followed the instructions), I mean I'm using conda as the virtual environment. or do you mean I should try to use other virtual env package or docker?

zplizzi commented 1 year ago

Ah, that should be fine. Can you try installing scipy==1.9.2 and trying again? I'm able to replicate this issue by updating scipy but it should work with 1.9.2.

leemiinseung commented 1 year ago

Now it works properly. But give a minor error at the end of check_install.py. (Just for your information)

avalon seems to be working properly!
Exception ignored in: <function Pool.__del__ at 0x146f726bb700>
Traceback (most recent call last):
  File "/home/mslee/miniconda3/envs/avalon/lib/python3.9/multiprocessing/pool.py", line 268, in __del__
  File "/home/mslee/miniconda3/envs/avalon/lib/python3.9/multiprocessing/queues.py", line 372, in put
AttributeError: 'NoneType' object has no attribute 'dumps'

Thank you for you help!

zplizzi commented 1 year ago

Great! The scipy version fix should now be live in 1.0.1. Probably calling env.close() would fix this cleanup error; I've applied that patch internally and it'll work its way into the public release soon.