Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eval support and debug sensor #850

Conversation

eundersander
Copy link
Contributor

@eundersander eundersander commented Apr 12, 2022

Run eval on a trained model's checkpoints as follows:

python habitat_baselines/run.py --exp-config path/to/your_gala_kinematic_eval_config.yaml --run-type eval

Some notes for these changes:

off-by-one

  • we should look closely at _eval_checkpoint to confirm I didn't introduce an off-by-one bug in terms of actions, steps, observations.

BatchedEnv.is_eval

  • this is a hacky public member var for now but should instead be hooked up to a yaml config
  • this member dictates that BatchedEnv should run through all episodes in the dataset only once; envs are disabled as necessary towards the end of the evaluation

recommended config for eval

  • DEBUG_RGB_SENSOR
    • when evaluating, be sure to include "DEBUG_RGB_SENSOR" in config.SENSORS
    • be sure not to include this when training (it will hurt runtime perf)
  • debug sensor size
    • see batched_env.py debug_width and debug_height
    • the size here greatly impacts eval speed
  • VIDEO_OPTION: ["disk"]
    • use this for eval
    • Beware I hit a runtime error when I enabled the "tensorboard" option (maybe my version of tensorboard is outdated)
  • NUM_ENVIRONMENTS: 32
    • Maybe try larger, but beware I was seeing a crash on my system seemingly due to GPU OOM.
  • EVAL_CKPT_PATH_DIR
    • set to the same as CHECKPOINT_FOLDER

gala_kinematic/python/sim_test.py (not in habitat-lab)

  • this is a script that generates a few random rollouts with videos (random actions; no inference)
  • this is a handy place to tune cameras

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 12, 2022
@ASzot
Copy link
Collaborator

ASzot commented Apr 12, 2022

LGTM. I can also add in more of the rendering functionality from Habitat 2.0, like rendering all of the info metrics to the current frame so we can have better insight into metrics used to compute rewards.

@eundersander eundersander merged commit c3c42f8 into facebookresearch:gala_kinematic Apr 13, 2022
@eundersander eundersander deleted the eundersander/gala_eval branch April 13, 2022 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants