Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

baselines

Installation

The habitat_baselines sub-package is NOT included upon installation by default. To install habitat_baselines, use the following command instead:

pip install -e habitat-lab
pip install -e habitat-baselines

This will also install additional requirements for each sub-module in habitat_baselines/, which are specified in requirements.txt files located in the sub-module directory.

Reinforcement Learning (RL)

Proximal Policy Optimization (PPO)

paper: https://arxiv.org/abs/1707.06347

code: The PPO implementation is based on pytorch-a2c-ppo-acktr.

dependencies: A recent version of pytorch, for installing refer to pytorch.org

For training on sample data please follow steps in the repository README. You should download the sample test scene data, extract it under the main repo (habitat-lab/, extraction will create a data folder at habitat-lab/data) and run the below training command.

train:

python -u -m habitat_baselines.run \
  --config-name=pointnav/ppo_pointnav_example.yaml

You can reduce training time by changing the trainer from the default implement to VER by setting trainer_name to "ver" in either the config or via the command line.

python -u -m habitat_baselines.run \
  --config-name=pointnav/ppo_pointnav_example.yaml \
  habitat_baselines.trainer_name=ver

test:

python -u -m habitat_baselines.run \
  --config-name=pointnav/ppo_pointnav_example.yaml \
  habitat_baselines.evaluate=True

We also provide trained RGB, RGBD, and Depth PPO models for MatterPort3D and Gibson. To use them download pre-trained pytorch models from link and unzip and specify model path here.

The habitat_baselines/config/pointnav/ppo_pointnav.yaml config has better hyperparameters for large scale training and loads the Gibson PointGoal Navigation Dataset instead of the test scenes. Change the /benchmark/nav/pointnav: pointnav_gibson in habitat_baselines/config/pointnav/ppo_pointnav.yaml to /benchmark/nav/pointnav: pointnav_mp3d in the defaults list for training on MatterPort3D PointGoal Navigation Dataset.

Hierarchical Reinforcement Learning (HRL)

We provide a two-layer hierarchical policy class, consisting of a low-level skill that moves the robot, and a high-level policy that reasons about which low-level skill to use in the current state. This can be especially powerful in long-horizon mobile manipulation tasks, like those introduced in Habitat2.0. Both the low- and high- level can be either learned or an oracle. For oracle high-level we use PDDL, and for oracle low-level we use instantaneous transitions, with the environment set to the final desired state. Additionally, for navigation, we provide an oracle navigation skill that uses A-star and the map of the environment to move the robot to its goal.

To run the following examples, you need the ReplicaCAD dataset.

To train a high-level policy, while using pre-learned low-level skills (SRL baseline from Habitat2.0), you can run:

python -u -m habitat_baselines.run \
  --config-name=rearrange/rl_hierarchical.yaml

To run a rearrangement episode with oracle low-level skills and a fixed task planner, run:

python -u -m habitat_baselines.run \
  --config-name=rearrange/rl_hierarchical.yaml \
  habitat_baselines.evaluate=True \
  habitat_baselines/rl/policy=hl_fixed \
  habitat_baselines/rl/policy/hierarchical_policy/defined_skills=oracle_skills

To change the task (like set table) that you train your skills on, you can change the line /habitat/task/rearrange: rearrange_easy to /habitat/task/rearrange: set_table in the defaults of your config.

Additional Utilities

Episode iterator options: Coming very soon

Tensorboard and video generation support

Enable tensorboard by changing tensorboard_dir field in habitat_baselines/config/pointnav/ppo_pointnav.yaml.

Enable video generation for eval mode by changing video_option: tensorboard,disk (for displaying on tensorboard and for saving videos on disk, respectively)

Generated navigation episode recordings should look like this on tensorboard:

Metadata

Release files for habitat-baselines 0.2.4.dev20230403

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for habitat-baselines 0.2.4.dev20230403
File Size Uploaded Provenance
habitat-baselines-0.2.4.dev20230403.tar.gz 145.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for habitat-baselines 0.2.4.dev20230403
File Interpreter ABI Platform
habitat_baselines-0.2.4.dev20230403-py3-none-any.whl Python 3 none any Details

Total release size: 342.5 kB

Release files / habitat-baselines-0.2.4.dev20230403.tar.gz

Download URL habitat-baselines-0.2.4.dev20230403.tar.gz
Size 145.8 kB
Tags Source
SHA-256 checksum
How to use checksums
435142fee2f6b43d1fad36ae143ee540d7dab1b544bfda766e444a90bc209b39
BLAKE2b-256 checksum
How to use checksums
d31e4b72eaacb393ff7dc92221fa07c46c382a83d6a743a3175e9295354262d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.4

Release files / habitat_baselines-0.2.4.dev20230403-py3-none-any.whl

Download URL habitat_baselines-0.2.4.dev20230403-py3-none-any.whl
Size 196.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
820617b28cbbab4cf693690f1c21ac8cf572a37bfa25866791bf4ec898d35d53
BLAKE2b-256 checksum
How to use checksums
14a2d5af323b888ff15ca0f14915cc72864d07550ac034c618454bc696cb76a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.4

Security for habitat-baselines 0.2.4.dev20230403

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page