tbp.monty: Windows OS not supported?
Describe the bug
Hi TBP,
I think Windows OS is not supported due to https://github.com/facebookresearch/habitat-sim/issues/1570 - if this is the case there should be a note on this in the code/docs?
Below is the complete message. If the above is the case I will see what workaround I can come up with.
PS C:\code\tbp.monty> conda env create C:\Users\paulm\anaconda3\Lib\argparse.py:2006: FutureWarning: remote_definitionis deprecated and will be removed in 25.9. Useconda env create --file=URL` instead.
action(self, namespace, argument_values, option_string)
Channels:
- aihabitat
- pytorch
- pyg
- defaults Platform: win-64 Collecting package metadata (repodata.json): done Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- aihabitat::habitat-sim==0.2.2
- wget
Current channels:
- https://conda.anaconda.org/aihabitat
- https://conda.anaconda.org/pytorch
- https://conda.anaconda.org/pyg
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/r
- https://repo.anaconda.com/pkgs/msys2
- https://conda.anaconda.org/conda-forge
To search for alternate channels that may provide the conda package you’re looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.`
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 21 (14 by maintainers)
The remaining unintended coupling to HabitatSim during benchmark or experiment run is being removed in the scope of #153. Once that pull request is merged (or if you want to use the pull request branch), running a Monty World experiment without HabitatSim installed should work, i.e.,
python benchmarks/run.py -e hand_intrusion_world_image_on_scanned_model.Tests continue to depend on HabitatSim, so
pytestwill still complain.Installing
conda install -c conda-forge pytest-xdistand restarting the shell got pytest running. Here is the output for windows with habitat_sim failures for reference:` ============================================================================================ test session starts ============================================================================================ platform win32 – Python 3.8.20, pytest-7.1.1, pluggy-1.5.0 rootdir: C:\code\tbp.monty, configfile: pyproject.toml, testpaths: tests/unit plugins: cov-3.0.0, forked-1.6.0, xdist-2.5.0 gw0 [168] / gw1 [168] / gw2 [168] / gw3 [168] / gw4 [168] / gw5 [168] / gw6 [168] / gw7 [168] / gw8 [168] / gw9 [168] / gw10 [168] / gw11 [168] / gw12 [168] / gw13 [168] … [100%] ================================================================================================== ERRORS =================================================================================================== ______________________________________________________________________________ ERROR collecting tests/unit/base_config_test.py ______________________________________________________________________________ ImportError while importing test module ‘C:\code\tbp.monty\tests\unit\base_config_test.py’. Hint: make sure your test modules/packages have valid Python names. Traceback: C:\Users\paulm\anaconda3\envs\tbp.monty\lib\importlib_init_.py:127: in import_module return _bootstrap.gcd_import(name[level:], package, level) tests\unit\base_config_test.py:18: in <module> from tbp.monty.frameworks.config_utils.config_args import ( src\tbp\monty\frameworks\config_utils\config_args.py:52: in <module> from tbp.monty.frameworks.models.motor_policies import ( src\tbp\monty\frameworks\models\motor_policies.py:18: in <module> import habitat_sim.utils as hab_utils E ModuleNotFoundError: No module named ‘habitat_sim’ ---------------------------------------------------------------------------------------------- Captured stdout ---------------------------------------------------------------------------------------------- MONTY_LOGS not set. Using default directory: C:\Users\paulm\AppData\Local\Temp\tmp66uzl7un MONTY_MODELS not set. Using default directory: C:\Users\paulm\AppData\Local\Temp\tmp66uzl7unpretrained_models/ WANDB_DIR not set. Using default directory: C:\Users\paulm\AppData\Local\Temp\tmp66uzl7un ____________________________________________________________________________ ERROR collecting tests/unit/custom_actions_test.py _____________________________________________________________________________ ImportError while importing test module ‘C:\code\tbp.monty\tests\unit\custom_actions_test.py’. Hint: make sure your test modules/packages have valid Python names. Traceback: C:\Users\paulm\anaconda3\envs\tbp.monty\lib\importlib_init.py:127: in import_module return _bootstrap.gcd_import(name[level:], package, level) tests\unit\custom_actions_test.py:12: in <module> import magnum as mn E ModuleNotFoundError: No module named ‘magnum’ _____________________________________________________________________________ ERROR collecting tests/unit/embodied_data_test.py _____________________________________________________________________________ ImportError while importing test module ‘C:\code\tbp.monty\tests\unit\embodied_data_test.py’. Hint: make sure your test modules/packages have valid Python names. Traceback: C:\Users\paulm\anaconda3\envs\tbp.monty\lib\importlib_init.py:127: in import_module return _bootstrap.gcd_import(name[level:], package, level) tests\unit\embodied_data_test.py:20: in <module> from tbp.monty.frameworks.config_utils.config_args import make_base_policy_config src\tbp\monty\frameworks\config_utils\config_args.py:52: in <module> from tbp.monty.frameworks.models.motor_policies import ( src\tbp\monty\frameworks\models\motor_policies.py:18: in <module> import habitat_sim.utils as hab_utils E ModuleNotFoundError: No module named ‘habitat_sim’ ______________________________________________________________________________ ERROR collecting tests/unit/evidence_lm_test.py ______________________________________________________________________________ ImportError while importing test module ‘C:\code\tbp.monty\tests\unit\evidence_lm_test.py’. Hint: make sure your test modules/packages have valid Python names. Traceback: C:\Users\paulm\anaconda3\envs\tbp.monty\lib\importlib_init.py:127: in import_module return _bootstrap.gcd_import(name[level:], package, level) tests\unit\evidence_lm_test.py:26: in <module> from tbp.monty.frameworks.config_utils.config_args import ( src\tbp\monty\frameworks\config_utils\config_args.py:52: in <module> from tbp.monty.frameworks.models.motor_policies import ( src\tbp\monty\frameworks\models\motor_policies.py:18: in <module> import habitat_sim.utils as hab_utils E ModuleNotFoundError: No module named ‘habitat_sim’ ____________________________________________________________________________ ERROR collecting tests/unit/graph_building_test.py _____________________________________________________________________________ ImportError while importing test module ‘C:\code\tbp.monty\tests\unit\graph_building_test.py’. Hint: make sure your test modules/packages have valid Python names. Traceback: C:\Users\paulm\anaconda3\envs\tbp.monty\lib\importlib_init.py:127: in import_module return _bootstrap.gcd_import(name[level:], package, level) tests\unit\graph_building_test.py:18: in <module> from tbp.monty.frameworks.config_utils.config_args import ( src\tbp\monty\frameworks\config_utils\config_args.py:52: in <module> from tbp.monty.frameworks.models.motor_policies import ( src\tbp\monty\frameworks\models\motor_policies.py:18: in <module> import habitat_sim.utils as hab_utils E ModuleNotFoundError: No module named ‘habitat_sim’ ____________________________________________________________________________ ERROR collecting tests/unit/graph_learning_test.py _____________________________________________________________________________ ImportError while importing test module ‘C:\code\tbp.monty\tests\unit\graph_learning_test.py’. Hint: make sure your test modules/packages have valid Python names. Traceback: C:\Users\paulm\anaconda3\envs\tbp.monty\lib\importlib_init.py:127: in import_module return _bootstrap.gcd_import(name[level:], package, level) tests\unit\graph_learning_test.py:24: in <module> from tbp.monty.frameworks.config_utils.config_args import ( src\tbp\monty\frameworks\config_utils\config_args.py:52: in <module> from tbp.monty.frameworks.models.motor_policies import ( src\tbp\monty\frameworks\models\motor_policies.py:18: in <module> import habitat_sim.utils as hab_utils E ModuleNotFoundError: No module named ‘habitat_sim’ _____________________________________________________________________________ ERROR collecting tests/unit/habitat_data_test.py ______________________________________________________________________________ ImportError while importing test module ‘C:\code\tbp.monty\tests\unit\habitat_data_test.py’. Hint: make sure your test modules/packages have valid Python names. Traceback: C:\Users\paulm\anaconda3\envs\tbp.monty\lib\importlib_init.py:127: in import_module return _bootstrap.gcd_import(name[level:], package, level) tests\unit\habitat_data_test.py:13: in <module> import magnum as mn E ModuleNotFoundError: No module named ‘magnum’ ______________________________________________________________________________ ERROR collecting tests/unit/habitat_sim_test.py ______________________________________________________________________________ ImportError while importing test module ‘C:\code\tbp.monty\tests\unit\habitat_sim_test.py’. Hint: make sure your test modules/packages have valid Python names. Traceback: C:\Users\paulm\anaconda3\envs\tbp.monty\lib\importlib_init.py:127: in import_module return _bootstrap.gcd_import(name[level:], package, level) tests\unit\habitat_sim_test.py:16: in <module> import habitat_sim E ModuleNotFoundError: No module named ‘habitat_sim’ ________________________________________________________________________________ ERROR collecting tests/unit/policy_test.py _________________________________________________________________________________ ImportError while importing test module ‘C:\code\tbp.monty\tests\unit\policy_test.py’. Hint: make sure your test modules/packages have valid Python names. Traceback: C:\Users\paulm\anaconda3\envs\tbp.monty\lib\importlib_init.py:127: in import_module return _bootstrap.gcd_import(name[level:], package, level) tests\unit\policy_test.py:16: in <module> import habitat_sim.utils as hab_utils E ModuleNotFoundError: No module named ‘habitat_sim’ _____________________________________________________________________________ ERROR collecting tests/unit/run_parallel_test.py ______________________________________________________________________________ ImportError while importing test module ‘C:\code\tbp.monty\tests\unit\run_parallel_test.py’. Hint: make sure your test modules/packages have valid Python names. Traceback: C:\Users\paulm\anaconda3\envs\tbp.monty\lib\importlib_init.py:127: in import_module return _bootstrap.gcd_import(name[level:], package, level) tests\unit\run_parallel_test.py:21: in <module> from tbp.monty.frameworks.config_utils.config_args import ( src\tbp\monty\frameworks\config_utils\config_args.py:52: in <module> from tbp.monty.frameworks.models.motor_policies import ( src\tbp\monty\frameworks\models\motor_policies.py:18: in <module> import habitat_sim.utils as hab_utils E ModuleNotFoundError: No module named ‘habitat_sim’ __________________________________________________________________________________ ERROR collecting tests/unit/run_test.py __________________________________________________________________________________ ImportError while importing test module ‘C:\code\tbp.monty\tests\unit\run_test.py’. Hint: make sure your test modules/packages have valid Python names. Traceback: C:\Users\paulm\anaconda3\envs\tbp.monty\lib\importlib_init.py:127: in import_module return _bootstrap.gcd_import(name[level:], package, level) tests\unit\run_test.py:19: in <module> import magnum as mn E ModuleNotFoundError: No module named ‘magnum’ _____________________________________________________________________________ ERROR collecting tests/unit/sensor_module_test.py _____________________________________________________________________________ ImportError while importing test module ‘C:\code\tbp.monty\tests\unit\sensor_module_test.py’. Hint: make sure your test modules/packages have valid Python names. Traceback: C:\Users\paulm\anaconda3\envs\tbp.monty\lib\importlib_init.py:127: in import_module return _bootstrap.gcd_import(name[level:], package, level) tests\unit\sensor_module_test.py:16: in <module> from tbp.monty.frameworks.config_utils.config_args import ( src\tbp\monty\frameworks\config_utils\config_args.py:52: in <module> from tbp.monty.frameworks.models.motor_policies import ( src\tbp\monty\frameworks\models\motor_policies.py:18: in <module> import habitat_sim.utils as hab_utils E ModuleNotFoundError: No module named ‘habitat_sim’ _________________________________________________________________________________ ERROR collecting tests/unit/tacto_test.py _________________________________________________________________________________ ImportError while importing test module ‘C:\code\tbp.monty\tests\unit\tacto_test.py’. Hint: make sure your test modules/packages have valid Python names. Traceback: C:\Users\paulm\anaconda3\envs\tbp.monty\lib\importlib_init.py:127: in import_module return _bootstrap.gcd_import(name[level:], package, level) tests\unit\tacto_test.py:11: in <module> import habitat_sim E ModuleNotFoundError: No module named ‘habitat_sim’ __________________________________________________________________ ERROR collecting tests/unit/frameworks/actions/habitat/actuator_test.py __________________________________________________________________ ImportError while importing test module ‘C:\code\tbp.monty\tests\unit\frameworks\actions\habitat\actuator_test.py’. Hint: make sure your test modules/packages have valid Python names. Traceback: C:\Users\paulm\anaconda3\envs\tbp.monty\lib\importlib_init.py:127: in import_module return _bootstrap._gcd_import(name[level:], package, level) tests\unit\frameworks\actions\habitat\actuator_test.py:13: in <module> from habitat_sim import Agent, AgentConfiguration E ModuleNotFoundError: No module named ‘habitat_sim’ ============================================================================================= warnings summary ============================================================================================== …..\Users\paulm\anaconda3\envs\tbp.monty\lib\site-packages_pytest\stepwise.py:52 C:\Users\paulm\anaconda3\envs\tbp.monty\lib\site-packages_pytest\stepwise.py:52: PytestCacheWarning: cache could not write path C:\code\tbp.monty.pytest_cache\v\cache\stepwise session.config.cache.set(STEPWISE_CACHE_DIR, [])
tests/unit/evidence_sdr_lm_test.py::EvidenceSDRIntegrationTest::test_can_generate_reasonable_sdrs C:\code\tbp.monty\src\tbp\monty\frameworks\models\evidence_sdr_matching.py:446: RuntimeWarning: invalid value encountered in divide evidence[valid_ix] = (evidence[valid_ix] - input_range[0]) * (
– Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ========================================================================================== short test summary info ========================================================================================== ERROR tests/unit/base_config_test.py ERROR tests/unit/custom_actions_test.py ERROR tests/unit/embodied_data_test.py ERROR tests/unit/evidence_lm_test.py ERROR tests/unit/graph_building_test.py ERROR tests/unit/graph_learning_test.py ERROR tests/unit/habitat_data_test.py ERROR tests/unit/habitat_sim_test.py ERROR tests/unit/policy_test.py ERROR tests/unit/run_parallel_test.py ERROR tests/unit/run_test.py ERROR tests/unit/sensor_module_test.py ERROR tests/unit/tacto_test.py ERROR tests/unit/frameworks/actions/habitat/actuator_test.py ================================================================================ 168 passed, 2 warnings, 14 errors in 59.87s ================================================================================ `
I agree, scipy’s Rotation function seems the most straight forward function to replace the use of
quat_rotate_vector(especially since we are using this function in all the other places). It should already be included in the installed dependencies as well (https://github.com/thousandbrainsproject/tbp.monty/blob/70d610af588c71f2d239d8fb0f1146fac44649a1/pyproject.toml#L26) For the quaternion <-> magnum conversions (quat_to_magnumandquat_from_magnum) it seems like we could just call whatever habitat implements in the respective functions instead (https://github.com/facebookresearch/habitat-sim/blob/d7da04897f234727813aee3368d7e44e0f08c50e/src_python/habitat_sim/utils/common.py#L48) since its just a straight forward call to magnum functionality (mn.Quaternion(quat.imag, quat.real))Not yet - would it not be performant due to CUDA? This might be resolved with Enable NVIDIA CUDA on WSL. If I am likely to end up with a fully functional performant set-up, I am happy to put in the work and document the whole process while doing it 😃
Hi, @internetscooter, did you try on WSL? It’s pretty seamless on WSL for windows users. I had to do very little updates to get the tests running. But it may not be performant for obvious reasons.
I removed the HabitatSim dependency from
motor_policies.pyin #79. The tests are still expected to fail, as there were no changes there.With coupling removed in
motor_policies.py, I discovered the next source of coupling to HabitatSim inmake_dataset_configs.py: https://github.com/thousandbrainsproject/tbp.monty/blob/c2c4f450ee3a57c9fc6f9f9f421bdbb18bcc8df9/src/tbp/monty/frameworks/config_utils/make_dataset_configs.py#L22-L26when attempting
@tristanls it still failed on the wget. I updated that to python-wget and that solved the errors
Edit: However pytest fails with
pytest: error: unrecognized arguments: -n, there might be another quirk with Windows and pytest-xdistOkay, so it sounds like for getting Monty running without habitat we can use
scipy.spatial.transform.Rotation.invinstead of the two lines that convert back and forth between quaternion and magnum.Making the unit tests independent of habitat will be a lot more involved 😬 This can be done in a second step later on.
I dug into the pre-open source code history, and based on that context (PR 201), the magnum conversion seems incidental and not done for a specific reason.