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

Overhaul Observation Transformation API + Better 360 and multisensor support. #478

Merged
merged 36 commits into from
Sep 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8cc6cf7
Add UUID config to simulator visual sensors
Skylion007 Sep 1, 2020
66c88af
Add comments about UUID and add to BumpSensor
Skylion007 Sep 2, 2020
989d287
Incorporate suggestions
Skylion007 Sep 2, 2020
2507424
Remove unused code
Skylion007 Sep 2, 2020
10f19e1
Make base sensor have overidable UUID
Skylion007 Sep 3, 2020
7ee0b14
Added observation transformer config values
Skylion007 Sep 8, 2020
85c44cf
Merge branch 'master' of https://github.com/facebookresearch/habitat-…
Skylion007 Sep 8, 2020
153c273
Remove duplicated class
Skylion007 Sep 8, 2020
5036d15
Bugfixes and missing fromConfig params
Skylion007 Sep 8, 2020
50ba099
Remove debug statements and add more type hints
Skylion007 Sep 8, 2020
41f3fa9
More typehints
Skylion007 Sep 8, 2020
be264a0
Improve docstring
Skylion007 Sep 8, 2020
9ca096b
Apply suggestions from code review
Skylion007 Sep 10, 2020
75b7e38
Address most of the comments
Skylion007 Sep 10, 2020
d0407c9
Refactor to use attr
Skylion007 Sep 11, 2020
4437c9b
Update API to have access to entire dict
Skylion007 Sep 11, 2020
a01e1b4
bugfixes
Skylion007 Sep 11, 2020
6d5898d
More bugfixes
Skylion007 Sep 11, 2020
350682b
more bugfixes
Skylion007 Sep 11, 2020
17350e4
Major refactor + Obs_Transformer overhaul
Skylion007 Sep 14, 2020
911050f
Fix license comment
Skylion007 Sep 14, 2020
69ae9d3
Remove observation transformers
Skylion007 Sep 14, 2020
1259d06
Merge branch 'obs_trans_registry' of https://github.com/facebookresea…
Skylion007 Sep 14, 2020
cf709da
Merge branch 'master' of https://github.com/facebookresearch/habitat-…
Skylion007 Sep 15, 2020
c0dbbc1
Fix errors and merge conflicts
Skylion007 Sep 15, 2020
e42a925
Fix issues, refactor and add tests
Skylion007 Sep 15, 2020
58e87c9
Fix minor bug
Skylion007 Sep 15, 2020
3af52da
address comments
Skylion007 Sep 15, 2020
9633189
Fix test and doc bug
Skylion007 Sep 15, 2020
f1f0ead
More docstring improvements
Skylion007 Sep 15, 2020
85b3f21
Fix bug in ResizeShortestEdge
Skylion007 Sep 15, 2020
77297f0
remove attrs from nn.module
Skylion007 Sep 15, 2020
1cd14da
Fix remaining bugs and refactor Cube2Equirec for smart device selection
Skylion007 Sep 15, 2020
c0c48a5
Improve obs_space handling in PPO and change defaults of Cube2EQ
Skylion007 Sep 15, 2020
40787f9
more doc strings
Skylion007 Sep 16, 2020
0de45d3
bump for ci
Skylion007 Sep 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions habitat_baselines/common/baseline_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,49 @@ def get_policy(cls, name: str):
r"""Get the RL policy with :p:`name`."""
return cls._get_impl("policy", name)

@classmethod
def register_obs_transformer(
cls, to_register=None, *, name: Optional[str] = None
):
r"""Register a Observation Transformer with :p:`name`.

:param name: Key with which the policy will be registered.
If :py:`None` will use the name of the class

.. code:: py

from habitat_baselines.common.obs_transformers import ObservationTransformer
from habitat_baselines.common.baseline_registry import (
baseline_registry
)

@baseline_registry.register_policy
class MyObsTransformer(ObservationTransformer):
pass


# or

@baseline_registry.register_policy(name="MyTransformer")
class MyObsTransformer(ObservationTransformer):
pass

"""
from habitat_baselines.common.obs_transformers import (
ObservationTransformer,
)

return cls._register_impl(
"obs_transformer",
to_register,
name,
assert_type=ObservationTransformer,
)

@classmethod
def get_obs_transformer(cls, name: str):
r"""Get the Observation Transformer with :p:`name`."""
return cls._get_impl("obs_transformer", name)


baseline_registry = BaselineRegistry()
Loading