facebookresearch / habitat-lab

A modular high-level library to train embodied AI agents across a variety of tasks and environments.
https://aihabitat.org/
MIT License
1.81k stars 460 forks source link

Skip json conversion of invalid attributes. #1992

Closed 0mdc closed 1 week ago

0mdc commented 1 week ago

Motivation and Context

This changeset prevent crashes when serializing invalid objects. This is the case for configs with MISSING attributes, which happens when using llm configs.

How Has This Been Tested

Tested on HITL with LLM configs.

Types of changes

Checklist

0mdc commented 1 week ago

Is print the best tool to use here? I have been wanting to make warning/info printing move towards loggers or warnings modules.

I agree. However, the entire HITL codebase uses print(). I'll reserve that as a BE refactor.