It’s been a while since I’ve posted about the progress of moving to the MuJoCo simulator, and upgrading Python. I want to take a moment to explain where we are, and what we’re planning.
For those who came in late, a quick summary of how we got here.
Currently tbp.monty uses Habitat-Sim for our simulated environments and we use Conda to manage it and the rest of our dependencies. This simulator has served us well over the past few years, but it has also caused some problems for us: causing interpreter crashes, preventing us from moving off Conda, and holding us back from newer Python versions, to name a few. We can add to that list that as of a few months ago, Habitat-Sim has been deprecated by Facebook Research, so we really need to get off of it sooner rather than later.
We did a survey of alternatives and settled on MuJoCo, and I’ve been working on adding support for it as a second simulator to Monty and moving us to it as quick as we can.
Where we are today
Everything I mention in this section has been merged into tbp.monty and so is available right now for anyone who wants to try it.
A fully working MuJoCo simulator that can run experiments
As of early last month, we have a working simulator that runs everything in MuJoCo. This includes the distant and surface agents, and we’ve made both into explicit concepts in this version, see the aptly named DistantAgent and SurfaceAgent. Part of this work has also improved how agents are configured from Hydra, though only for MuJoCo.
We’ve looked at a few of the experiment results and compared them to the Habitat results and they’re very close, which is notable because we’re using models trained on Habitat to detect objects using data from the MuJoCo simulator. Of course, we plan to train new models using MuJoCo, but the fact that the results are already close using Habitat models is encouraging.
Note: The experiment configurations themselves haven’t been updated yet, that’s work currently in progress.
The MuJoCo test suite is finished
As of last week, we’ve creating MuJoCo versions of all of the integration and unit tests that were dependent on Habitat. And we’ve compared the code coverage we have under both suites to make sure we haven’t missed anything critical. It doesn’t cover everything, but neither do the Habitat versions. These new tests have been running in a test suite, along with the other platform-agnostic tests in our CI environment under uv.
Up until now, the test-uv-monty tests have been optional, but very soon we’re planning to make them required so that we can be sure any changes being made don’t break the new environment.
Currently the new tests live under tests/mujoco, with the directory structure below that mirroring the main tests under tests. When we’re ready to retire Habitat, they’ll move to replace the originals.
The uv environment has been upgraded to Python 3.13
We’ve been targeting an upgrade to 3.10, but the version of NumPy we were using on 3.10 has an annoying bug on Apple Silicon where it logs spurious floating point warnings that aren’t real. The newer version of NumPy that fixes it was available on 3.11, and while we could switch to that, I decided to try to push ahead as far as we could. We’re held back from 3.14 because the current version of Hydra doesn’t support it, but there’s already a fix for the issue, so it’s just a matter of them releasing a new version.
There were only a few changes needed to support the newer versions of Python and our dependencies, and those have now been merged in.
With all of these changes, the uv environment is in a place where it can be used without too much hassle. To get an environment set up, assuming you have uv installed (I would recommend using Homebrew), it should be as simple as running:
uv sync --extra dev --extra simulator_mujoco
It’s possible to have both the Conda environment and the uv environment set up in parallel, in fact I’ve been doing this for months now to test both versions to make sure changes I’m making haven’t broken Monty for everyone else.
Our plan going forward will be to aggressively upgrade Python and our dependencies to keep from falling behind again.
What remains
There are only a few more steps before we can switch over and retire Habitat.
Create MuJoCo versions of the benchmark experiments
We need to create versions of the benchmark experiments that we can run and compare with the existing benchmarks to see how far off things are. This has been a process similar to the tests where we’re creating alternative versions, which will eventually replace the originals. Work has already started on this and I don’t foresee any problems coming up.
Train new models
This might need to happen concurrently with the previous work, but at some point we need to train new models using MuJoCo, both to prove out that training works, but also to use models that were trained on this simulator.
Updating tutorials and documentation
There are some changes to the tutorials and documentation that need to be made to refer to MuJoCo and not Habitat. Those are a simple housekeeping matter once the main work is finished.
Remove Habitat and Conda
At this point, everyone should be able to migrate over to using the MuJoCo simulator full time, and then we can remove Habitat and the Conda environment and clean up any remaining artifacts of Habitat in the project. There’s nothing quite as satisfying as deleting old code.
I’m excited to see this work getting closer to the finish line. The end is in sight and when it arrives it should provide a better foundation to work from with fewer hassles for everyone.