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][WIP] - Dataset Diagnostics and Repairs #2457

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

jturner65
Copy link
Contributor

@jturner65 jturner65 commented Aug 23, 2024

Motivation and Context

This PR introduces a transparent dataset diagnostics protocol that can be controlled by setting flags using the optional tag "request_diagnostics" placed in the scene dataset config, followed by either an individual string or a list of strings, each specifying a desired diagnostic to be performed.

As a proof of concept, as well as to address an existing issue with the base hssd scene instances, the following tags are currently supported :

  • SaveCorrected : save any files that have been tested and corrected. Ignored if no tests specified
  • TestForSceneInstanceDuplicates : test for duplicate rigid/articulated object instances on scene instance load, not loading duplicates if found.
  • TestForSemanticRegionDuplicates : test for duplicate semantic region definitions on semantic attributes load, not loading duplicates if found.
  • All : perform all diagnostic tests but do not save results to file.
  • AllSaveCorrected : perform all diagnostic tests and save corrected configurations

This PR will perform conditional de-duplication of any loaded subconfiguration, such as Object Instances from the Scene Instance configuration file, if the appropriate test (TestForSceneInstanceDuplicates) is requested. If multiple such object instances are loaded that have identical data, then the extra duplicates will not be saved as part of the internal representation of the scene instance.

If SaveCorrected is specified, the scene instance, in this case, minus the extra duplicates, will be saved to disk. Otherwise, it will just be retained in memory for the lifetime of the execution.

This functionality is also available for SemanticAttributes/configs, should identical SemanticRegion definitions exist within the original json config description.

This PR is currently set up to prevent any duplicate SceneObjectInstanceAttributes or SceneAOInstanceAttributes from being saved when a SceneInstanceAttributes is being created for manual save to disk.

This PR also includes a renaming refactor for attributes and attributes manager base classes to fall in line with standard naming protocol and be less confusing.

Still needed :

  • Tests

How Has This Been Tested

Locally c++ and python tests pass (currently transparent pass-through)

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.

@jturner65 jturner65 requested a review from aclegg3 August 23, 2024 18:43
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Aug 23, 2024
@jturner65
Copy link
Contributor Author

So currently to request a diagnostic, say on duplicate scene object instances, you would add the following line to the scene dataset config :

"request_diagnostics":"TestForSceneInstanceDuplicates",

or

"request_diagnostics":["TestForSceneInstanceDuplicates"],

if you wanted to save the scene instances that were corrected by the diagnostic process, you would use

"request_diagnostics":["TestForSceneInstanceDuplicates", "SaveCorrected"],

and when you do not wish for any diagnostics anymore, you would just delete the line from the scene dataset config.

Other mechanisms for performing these diagnostics would be easy to implement, this was just the mechanism I started with.

@jturner65 jturner65 marked this pull request as ready for review August 23, 2024 21:12
@jturner65 jturner65 changed the title --[BE][WIP] - Dataset Diagnostics and Attributes Deduplication --[BE] - Dataset Diagnostics and Attributes Deduplication Aug 23, 2024
@jturner65 jturner65 changed the title --[BE] - Dataset Diagnostics and Attributes Deduplication --[BE][WIP] - Dataset Diagnostics and Attributes Deduplication Aug 26, 2024
@jturner65 jturner65 marked this pull request as draft August 26, 2024 13:12
@jturner65 jturner65 force-pushed the BE_DatasetDiagnostics branch 3 times, most recently from 2cbac1b to 07e6303 Compare September 4, 2024 18:45
@jturner65 jturner65 changed the base branch from main to dev September 13, 2024 12:57
@jturner65 jturner65 force-pushed the BE_DatasetDiagnostics branch 2 times, most recently from 0d307c0 to a719566 Compare September 18, 2024 17:14
@jturner65 jturner65 changed the title --[BE][WIP] - Dataset Diagnostics and Attributes Deduplication --[BE][WIP] - Dataset Diagnostics and Repairs Oct 7, 2024
Base automatically changed from dev to main November 4, 2024 16:35
@jturner65 jturner65 force-pushed the BE_DatasetDiagnostics branch 2 times, most recently from 05b2529 to 3d06135 Compare November 11, 2024 16:03
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.

2 participants