minerllabs / minerl

MineRL Competition for Sample Efficient Reinforcement Learning - Python Package
http://minerl.io/docs/
Other
707 stars 153 forks source link

Error when trying to run the BASALT baseline #766

Open sramichetty20019 opened 7 months ago

sramichetty20019 commented 7 months ago

Hi everyone i am trying to run https://github.com/minerllabs/basalt-2022-behavioural-cloning-baseline?tab=readme-ov-file on my system all the packages including minerl work fine however I am getting the following error Screenshot 2024-04-18 at 7 32 07 PM

The command I ran was python run_agent.py --model foundation-model-1x.model --weights foundation-model-1x.weights --env MineRLBasaltFindCave-v0 --show I have the .model and .weights file how do I solve this error , what actually is causing this error I am also attaching the logs

:128: RuntimeWarning: 'minerl.utils.process_watcher' found in sys.modules after import of package 'minerl.utils', but prior to execution of 'minerl.utils.process_watcher'; this may result in unpredictable behaviour Traceback (most recent call last): File "/home/srinija/basalt-2022-behavioural-cloning-baseline/run_agent.py", line 45, in main(args.model, args.weights, args.env, show=args.show) File "/home/srinija/basalt-2022-behavioural-cloning-baseline/run_agent.py", line 20, in main obs = env.reset() ^^^^^^^^^^^ File "/home/srinija/anaconda3/envs/minerl/lib/python3.11/site-packages/gym/wrappers/time_limit.py", line 26, in reset return self.env.reset(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/srinija/anaconda3/envs/minerl/lib/python3.11/site-packages/gym/wrappers/order_enforcing.py", line 18, in reset return self.env.reset(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/srinija/anaconda3/envs/minerl/lib/python3.11/site-packages/minerl/herobraine/env_specs/basalt_specs.py", line 78, in reset return self.env.reset() ^^^^^^^^^^^^^^^^ File "/home/srinija/anaconda3/envs/minerl/lib/python3.11/site-packages/minerl/herobraine/env_specs/basalt_specs.py", line 57, in reset return super().reset() ^^^^^^^^^^^^^^^ File "/home/srinija/anaconda3/envs/minerl/lib/python3.11/site-packages/gym/core.py", line 283, in reset return self.env.reset(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/srinija/anaconda3/envs/minerl/lib/python3.11/site-packages/minerl/env/_singleagent.py", line 22, in reset multi_obs = super().reset() ^^^^^^^^^^^^^^^ File "/home/srinija/anaconda3/envs/minerl/lib/python3.11/site-packages/minerl/env/_multiagent.py", line 436, in reset self._setup_instances() File "/home/srinija/anaconda3/envs/minerl/lib/python3.11/site-packages/minerl/env/_multiagent.py", line 539, in _setup_instances self.instances.extend([f.result() for f in instance_futures]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/srinija/anaconda3/envs/minerl/lib/python3.11/site-packages/minerl/env/_multiagent.py", line 539, in self.instances.extend([f.result() for f in instance_futures]) ^^^^^^^^^^ File "/home/srinija/anaconda3/envs/minerl/lib/python3.11/concurrent/futures/_base.py", line 449, in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ File "/home/srinija/anaconda3/envs/minerl/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result raise self._exception File "/home/srinija/anaconda3/envs/minerl/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/srinija/anaconda3/envs/minerl/lib/python3.11/site-packages/minerl/env/_multiagent.py", line 805, in _get_new_instance instance.launch(replaceable=self._is_fault_tolerant) File "/home/srinija/anaconda3/envs/minerl/lib/python3.11/site-packages/minerl/env/malmo.py", line 427, in launch raise EOFError( EOFError: /home/srinija/anaconda3/envs/minerl/lib/python3.11/site-packages/minerl/env/../MCP-Reborn SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [19:27:40] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [19:27:40] [Render thread/INFO]: Setting user: Player818 [19:27:40] [Render thread/INFO]: Backend library: LWJGL version 3.2.2 SNAPSHOT ---- Minecraft Crash Report ---- // Oh - I know what I did wrong! Time: 4/18/24 7:27 PM Description: Initializing game java.lang.IllegalStateException: Failed to initialize GLFW, errors: GLFW error during init: [0x10008]140308308819712 at com.mojang.blaze3d.platform.GLX._initGlfw(GLX.java:80) at com.mojang.blaze3d.systems.RenderSystem.initBackendSystem(RenderSystem.java:586) at net.minecraft.client.Minecraft.(Minecraft.java:406) at net.minecraft.client.main.Main.main(Main.java:154) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at com.mojang.blaze3d.platform.GLX._initGlfw(GLX.java:80) at com.mojang.blaze3d.systems.RenderSystem.initBackendSystem(RenderSystem.java:586) at net.minecraft.client.Minecraft.(Minecraft.java:406) -- Initialization -- Details: Stacktrace: at net.minecraft.client.main.Main.main(Main.java:154) -- System Details -- Details: Minecraft Version: 1.16.5 Minecraft Version ID: 1.16.5 Operating System: Linux (amd64) version 5.4.0-150-generic Java Version: 1.8.0_382, Azul Systems, Inc. Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Azul Systems, Inc. Memory: 1144438968 bytes (1091 MB) / 2299527168 bytes (2193 MB) up to 3817865216 bytes (3641 MB) CPUs: 24 JVM Flags: 1 total; -Xmx4G Launched Version: ~~NULL~~ Backend library: LWJGL version 3.2.2 SNAPSHOT Backend API: NO CONTEXT GL Caps: Using VBOs: Yes Is Modded: Very likely; Jar signature invalidated Type: Client (map_client.txt) CPU: #@!@# Game crashed! Crash report saved to: #@!@# /home/srinija/anaconda3/envs/minerl/lib/python3.11/site-packages/minerl/MCP-Reborn/./crash-reports/crash-2024-04-18_19.27.40-client.txt Minecraft process finished unexpectedly. There was an error with Malmo.
Miffyli commented 7 months ago

Hey. You need a display attached, or you need to use xvfb-run -a python your_script.py . OpenGL errors usually suggest that this is the cause. See docs.

sramichetty20019 commented 7 months ago

This solution worked , thank you so much