Open zaptrem opened 1 year ago
As far as I am aware, Dreamer experiments relied on the older version of MineRL (v0.4.4). Make sure to install those.
Also, double-check your Java versions by checking java/javac --version
; it should output something along lines of "1.8...". Sometimes a sneaky Java installation is used even if JDK 8 is installed.
If those do not help, paste the full log of error messages. A more informative error is usually higher up.
As far as I am aware, Dreamer experiments relied on the older version of MineRL (v0.4.4). Make sure to install those.
Also, double-check your Java versions by checking
java/javac --version
; it should output something along lines of "1.8...". Sometimes a sneaky Java installation is used even if JDK 8 is installed.If those do not help, paste the full log of error messages. A more informative error is usually higher up.
Thanks for getting back so quickly! I switched to v0.4.4 and it seems to be working now. However, even with 2 envs on a system with 32GB of RAM and 12 cores the clients appear to be stepping pretty slowly (4/20 times per second). Also, shortly after completing the first episode/mission all of the clients crash or are killed (The behavior is the same with 8 clients, 4, and 2). Here's the log: https://cdn.discordapp.com/attachments/378227457750466574/1093581895536738384/message.txt
The "ticks per second" thing does not quite tell the step count, but yes, it is running bit slow. MineRL in general runs pretty slow, but that amount of warnings does sound bit suspicious. Games do want high core-clock CPUs, so that might explain the slow behaviour (or if machine is doing other CPU-heavy stuff).
As for the crashes, I recommend you try a bare Gym loop (create env, step through env with random actions), and see if it crashes. If not, something in the training code makes it act up (hard to say what, exactly. Could be lack of resets). However, the env tends to crash randomly at times, and I recommend wrapping all step/reset calls around some sort of safety check (if step/reset fails, recreate env).
The "ticks per second" thing does not quite tell the step count, but yes, it is running bit slow. MineRL in general runs pretty slow, but that amount of warnings does sound bit suspicious. Games do want high core-clock CPUs, so that might explain the slow behaviour (or if machine is doing other CPU-heavy stuff).
As for the crashes, I recommend you try a bare Gym loop (create env, step through env with random actions), and see if it crashes. If not, something in the training code makes it act up (hard to say what, exactly. Could be lack of resets). However, the env tends to crash randomly at times, and I recommend wrapping all step/reset calls around some sort of safety check (if step/reset fails, recreate env).
Hmm, I downloaded the repo as it was in 0.4.4 to run the test scripts and get this when running the multi-agent one even with a single agent, which says to report this issue to the maintainers:
MineRL has never had official support for multi-agent code even though there are some remnants on some implementation for it in the code-base, so those features are really finnicky if they even exist. The error message about gradle is about reporting it to Malmö creators, but that repo is not maintained either.
In short: multi-agent support is not supported and we can not provide help with it.
MineRL has never had official support for multi-agent code even though there are some remnants on some implementation for it in the code-base, so those features are really finnicky if they even exist. The error message about gradle is about reporting it to Malmö creators, but that repo is not maintained either.
In short: multi-agent support is not supported and we can not provide help with it.
Thanks for letting me know, but I also ran the multi-agent test script with --single enabled (which makes it single agent) in order to get a quick gym action loop and still had the same issue.
The whole multi-agent code side does not work. Note that the environment code file is called "multiagent" but it still does not really support it. You should create the environments via Gym API as well and not directly via the environment classes, as the wrappers set some env stuff.
The whole multi-agent code side does not work. Note that the environment code file is called "multiagent" but it still does not really support it. You should create the environments via Gym API as well and not directly via the environment classes, as the wrappers set some env stuff.
I ran the following code using gym directly as suggested:
import minerl
import gym
env = gym.make('MineRLNavigateDense-v0')
obs = env.reset()
done = False
while not done:
action = env.action_space.sample()
obs, reward, done, info = env.step(
action)
But got the same error: WARNING: Illegal reflective access by com.microsoft.Malmo.Launcher.GradleStart (file:/tmp/tmptzi4y445/Minecraft/build/libs/MalmoMod-0.37.0-fat.jar) to field java.lang.ClassLoader.sys_paths
Full Log: https://pastebin.com/dSDumbdz
Hmm, the only suggestion that comes to mind is that double-check the java version you have active when launching that command, i.e. before you run your Python command on the command line, check what java -version
says (should say the usual "1.8..."). Often any Java errors are a result of wrong Java version being used (and sometimes it sneakily changes on peoples' systems).
If the Java version does still check out ("1.8...."), I am loss at help to give :(. Either the installation is corrupted (reinstallation could help), or this is a new bug I have not seen before. If the latter case, having information on your system (OS, Python version, exact Java version, etc) would give little help, but unfortunately I won't be able to help much beyond that.
Hello, I'm trying to use the DreamerV3 repo's Minecraft preset which relies on MineRL but the clients crash on launch. I'm using WSL and have confirmed Minecraft runs fine in the virtual environment and is correctly accelerated by OpenGL. I'm using OpenJDK8 as is required. Any idea what could be going wrong?