-
Notifications
You must be signed in to change notification settings - Fork 556
Add config type annotations to rearrange_sim. #2135
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
Conversation
@@ -1667,7 +1668,7 @@ class AgentConfig(HabitatBaseConfig): | |||
max_climb: float = 0.2 | |||
max_slope: float = 45.0 | |||
grasp_managers: int = 1 | |||
sim_sensors: Dict[str, SimulatorSensorConfig] = field(default_factory=dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field has a bad smell.
When refactoring sensors, we should revisit how users define their sensors. If you look just above, you'll notice that framework-level subclasses were created for application-level code.
We should aim to use composition rather than inheritance to define sensors.
|
||
@contextmanager | ||
def read_write(config: "Container") -> Generator[Node, None, None]: | ||
def read_write(config: Any) -> Generator[Node, None, None]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably avoid using this altogether.
Changing configs mid-execution contributes to the complexity explosion we're experiencing, and drives us away from a data-driven paradigm.
|
||
def overwrite_config( | ||
config_from: DictConfig, | ||
config_from: Any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments for reviewers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the changes look good here. Some cleanup for tests left based on import layering. Apparently we import DictConfig from default.py, haha.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
Motivation and Context
This changeset annotates the
rearrange_sim
config types to provide type annotations for configs.How Has This Been Tested
CI
Types of changes
Checklist