-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Projector: Metadata editor #753
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
Projector: Metadata editor #753
Conversation
Add a metadata editor to the Projector, which gives the option to modify attributes of selected points. Projector components related to metadata display are refreshed after attribute changes, which also expands the color palette for the modified attribute when a new class is added. The main 'Label by' dropdown-menu is incorporated into the metadata editor, which requires the user to view the point labels for the metadata column being changed.
This is a wonderful change. Thank you for the detailed notes and screenshots, this really makes the review quite easy :) One high level comment: PointMetadata also contains a type: https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/projector/vz_projector/data.ts#L20 What do you think of enforcing the type? This way, you wont run into mixing and matching problems when we try to do things like coloring by a metadata field by a continuous value. Review status: 0 of 4 files reviewed at latest revision, 6 unresolved discussions. tensorboard/plugins/projector/vz_projector/vz-projector-data-panel.ts, line 133 at r1 (raw file):
remove this blank line tensorboard/plugins/projector/vz_projector/vz-projector-data-panel.ts, line 135 at r1 (raw file):
use "===" everywhere except for "== null". === is exact equality, == will do an implicit cast (so when you check null it will also check undefined) here and below tensorboard/plugins/projector/vz_projector/vz-projector-data-panel.ts, line 254 at r1 (raw file):
remove this blank line tensorboard/plugins/projector/vz_projector/vz-projector-data-panel.ts, line 264 at r1 (raw file):
remove trailing space tensorboard/plugins/projector/vz_projector/vz-projector-data-panel.ts, line 301 at r1 (raw file):
remove the spaces tensorboard/plugins/projector/vz_projector/vz-projector-data-panel.ts, line 305 at r1 (raw file):
remove the spaces Comments from Reviewable |
Corrected spacing and now checking for exact non-cast equalities, according to pull request feedback.
…ata-editor-v2-merge
@nsthorat Please check the newest corrections, based on your feedback, thanks. To enforce a number-only metadata column will require checking isNumeric in the ColumnStats, adding a check and extra status message in the metadata editor with a label-button disabling. This is sensible and a relatively minor addition to make, thanks for the suggestion. As there are some other additions to the metadata editor already integrated into some of the open PRs, such as the metadata context and keybindings, I'd like to add the type-enforcing on top of those to prevent conflicts with existing PRs so as to speed up merging. Alas, I believe it will be necessary to separate the display column (currently used for metadata editor) and an edited column so that one can edit metadata while viewing other metadata. This becomes important when working with text data where there is no other visual representation available as with images having sprites. Actually, to be prudent, I think I should make all these additions here to get the metadata editor as solid as possible. Then I'll just fix conflicts for later PRs. |
…ata-editor-v2-merge
Allow for the metadata editor label paper-input to capture Enter keydown as a Label button press. Now button becomes disabled upon application of a label, then the labeling is applied, then the metadata editor paper-input status message confirms application.
Check if metadata column isNumeric, and disable label button if label input is not numeric. This enforces isNumeric metadata columns to remain numeric when label changes are made.
Reintroduce 'Label by' field, which is necessary to view text-based data representations while labeling in another 'Edit by' field.
Add a metadata context to the inspector panel, showing the available labels and label counts for the 'Edit by' metadata column. By clicking a label in this list it is immediately applied to the point selection, which makes it easier to modify metadata with longer labels since they do not have to be entered every time. Metadata context is entered whenever there is content in the metadata editor label field, as soon as the field is cleared the context is removed. While in metadata context the neighborhood size can still be changed, and a label search can be performed to highlight points with a certain label not necessarily from the same metadata column. This adds versatility in locating point groups with a specified label while being able to quickly modify the metadata.
Properly disable metadata edit for non-numeric inputs where isNumeric required.
Add download button to data panel to allow for download of metadata with label modifications that may have been made. Filename is hardcoded to 'metadata-edited.tsv' and set as text blob.
Replace == with === in inspector-panel code.
@nsthorat The metadata editor is now fully fledged and can be merged after inspection, please check the newest demo at http://tensorserve.com:6018 . |
Review status: 0 of 5 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
Looks like I can't merge this +@chihuahua |
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.
Approving because reviewable didn't seem to trigger approval of the PR.
Add a metadata editor to the Projector, which gives the option to modify attributes of selected points. Projector components related to metadata display are refreshed after attribute changes, which also expands the color palette for the modified attribute when a new class is added.
This is very helpful to make alterations and corrections to an existing labeling, although changes are only made in the browser session, but a modified metadata file can be downloaded.
Demo here: http://tensorserve.com:6018
Supersedes:
Superseded by #756, which integrates the metadata editor and supervision. Though this PR may be merged first and then #756 as there likely shouldn't be any conflicts.
@dsmilkov - This is currently the best version of the metadata editor to merge. Simplified the metadata editor status messaging, but we could consider using existing sample sizes of applied labels in future.
Design and behavior
Data panel before
Data panel with metadata editor
Status updates in metadata editor