ManagedObjects : CSV Informational Reports#1331
Merged
jturner65 merged 25 commits intofacebookresearch:masterfrom Jun 22, 2021
Merged
ManagedObjects : CSV Informational Reports#1331jturner65 merged 25 commits intofacebookresearch:masterfrom
jturner65 merged 25 commits intofacebookresearch:masterfrom
Conversation
Skylion007
approved these changes
Jun 21, 2021
| // Must always be valid value | ||
| ObjectInstanceShaderType shaderType = | ||
| static_cast<ObjectInstanceShaderType>(translationOrigin); | ||
| for (const auto& it : ShaderTypeNamesMap) { |
Contributor
There was a problem hiding this comment.
We really may want to invest in a bimap implementation
Contributor
|
The biggest issue here is that the string are not built efficiently. See https://clang.llvm.org/extra/clang-tidy/checks/performance-inefficient-string-concatenation.html |
Skylion007
suggested changes
Jun 21, 2021
Skylion007
reviewed
Jun 22, 2021
Skylion007
reviewed
Jun 22, 2021
| .append(lightInst.second->getObjectInfoHeader()) | ||
| .append("\n"); | ||
| } | ||
| res.append(", ").append(lightInst.second->getObjectInfo()).append("\n"); |
Contributor
There was a problem hiding this comment.
Again here (pretty sure there is a more efficient overload for appending chars.
Skylion007
reviewed
Jun 22, 2021
| .append(",\n"); | ||
|
|
||
| // stage instance info | ||
| res.append(stageInstance_->getObjectInfo()).append("\n"); |
Skylion007
reviewed
Jun 22, 2021
| // stages | ||
| std::vector<std::string> stageAttrInfoAra = | ||
| stageAttributesManager_->getObjectInfoStrings(); | ||
| for (const std::string& s : stageAttrInfoAra) { |
Skylion007
reviewed
Jun 22, 2021
Skylion007
reviewed
Jun 22, 2021
Skylion007
reviewed
Jun 22, 2021
| for (const auto& lightInst : lightInstances_) { | ||
| if (iter == 0) { | ||
| iter++; | ||
| res.append(1, ',') |
Contributor
There was a problem hiding this comment.
BTW res+= for every item is also viable here.
Skylion007
approved these changes
Jun 22, 2021
368a772 to
86723fa
Compare
Contributor
Author
|
Here's an example report generated on the AI2Thor scene instances I generated a few months ago, to give an idea of what this will look like. |
This file will also hold pending attributes/object wrappers/MetadataManager python utils
3d56640 to
a06a212
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
This PR introduces reporting functionality for loaded attributes and wrappers from their respective managers, and the Metadata Mediator. Functions are provided that will construct csv-friendly strings of data from each attributes and managed object, and lists of these strings for each manager. The MetadaMediator can be queried to provide an aggregate report of all loaded configurations.
This functionality is of particular importance with upcoming MetadataMediator/SceneDataset/SceneInstance Documentation and Tutorials. This also has a simple python writer function provided.
How Has This Been Tested
C++ and python tests pass. The MetadataMediator test has been expanded to test this functionality, although currently it just displays a report.
Types of changes
Checklist