facebookresearch / mbrl-lib

Library for Model Based RL
MIT License
952 stars 154 forks source link

[Bug] Training browser crashes on Windows #152

Closed MarcoKe closed 2 years ago

MarcoKe commented 2 years ago

Steps to reproduce

  1. Run mbrl/diagnostics/training_browser.py

Observed Results

Traceback (most recent call last): File "diagnostics\training_browser.py", line 369, in window = BasicTrainingResultsWindow(args.experiments) File "diagnostics\training_browser.py", line 185, in init self.experimentTable = ExperimentsModel( File "diagnostics\training_browser.py", line 45, in init self.reloadExperiments(data) File "diagnostics\training_browser.py", line 61, in reloadExperiments entry = [config["algorithm"]["name"]] TypeError: string indices must be integers

Expected Results

I would have expected to GUI to launch.

Relevant Code

This line is the culprit: path.replace("/{}".format(SOURCE), "/.hydra/config.yaml"), "r"

Replacing a forward slash in a path is not going to work on Windows

I will create a pull request with a fix in a moment