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

--[BE Week]More informative and appropriate data/metadata load and processing messages #2144

Merged
merged 7 commits into from
Jul 6, 2023

Conversation

jturner65
Copy link
Contributor

Motivation and Context

This PR addresses a few key issues with regard to the data load process and providing the user meaningful feedback on progress and issues that may arise. Along with clarifying many messages, the following changes were made :

MetadataMediator

  • Some errors were updated to ESP_CHECK so that they would end the load process immediately if issues were present in the dataset load.
  • A compound ESP_CHECK pertaining to the initial loading of the scene dataset was broken up into 3 individual checks, so that specific errors could be clearly communicated to the user.

ResourceManager/AttributesManagers

  • Some Debug messages were demoted to Very Verbose
  • Conditionally build a compound debug message string only if Debug-level messages are enabled.

SceneInstanceAttributes
The default empty Scene Instance will no longer complain about not having a Stage Instance, a misleading message about an expected state. On the other hand, if a non-default Scene Instance attempts to load with no Stage Instance, this will fail an ESP_CHECK, since we expect at the very least a Stage Instance for any scene to load correctly.

General
Usage of 'Abort' in non-ESP_CHECK() messages : 'Aborting' is a commonly used tag we put at the end of failed assertion messages, implying program exit due to a specific check or line of code producing an unrecoverable error. However, many ESP_ERROR() streams (And even a few ESP_WARNING() streams) currently end just with the term "Aborting." as well, in an ambiguous attempt to infer that the function's execution is ending early, possibly with a non-useful return result, such as nullptr or ID_UNDEFINED. I have replaced these 'Aborting' messages where I could find them with clearer descriptions of what was happening in the guilty function as a result of the error.

How Has This Been Tested

All C++ and python tests pass

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jun 30, 2023
@jturner65 jturner65 changed the title --[BE Week]More informative and appropriate dataset load messages --[BE Week]More informative and appropriate data/metadata load and processing messages Jun 30, 2023
Some demotions to verbose;
We often use 'Aborting' in failed assertion messages, usually implying a core dump. This commit clarifies when processes fail due to data errors, not so grievously that an assertion/std::abort is called for. These failures are often caught downstream by ESP_CHECK.
The default scene instance attributes will have all fields empty, so a stage_instance can be created with a template name of NONE, corresponding to the NONE stage.

However, if a non-default scene instance configuration is loaded and it is lacking the stage_instance field, that is indicative of a dataset error (There always must be a stage instance specified for every scene instance) and so exit the program so that it can be fixed.
Function used to load, but now it just sets the attributes based on already loaded JSON.
Copy link
Contributor

@0mdc 0mdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Left some minor remarks.

src/esp/metadata/MetadataMediator.cpp Outdated Show resolved Hide resolved
src/esp/metadata/MetadataMediator.cpp Outdated Show resolved Hide resolved
src/esp/metadata/MetadataMediator.cpp Outdated Show resolved Hide resolved
src/esp/metadata/MetadataMediator.cpp Show resolved Hide resolved
src/esp/core/managedContainers/ManagedFileBasedContainer.h Outdated Show resolved Hide resolved
src/esp/metadata/MetadataMediator.h Outdated Show resolved Hide resolved
@jturner65 jturner65 merged commit 8eb02ad into main Jul 6, 2023
9 of 10 checks passed
@jturner65 jturner65 deleted the BE_DataLoadImprovements branch July 6, 2023 11:50
<< activeSceneDataset_ << Mn::Debug::nospace
<< "`. Likely the Scene Dataset Configuration requested was not "
"found and so a new, empty Scene Dataset was created. Verify the "
"Scene Dataset Configuration file name used.");
Copy link
Contributor

@0mdc 0mdc Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jturner65 That check is triggered when loading FloorPlanner from Habitat-Lab.

aclegg3 added a commit that referenced this pull request Jul 13, 2023
aclegg3 added a commit that referenced this pull request Jul 14, 2023
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