-
Notifications
You must be signed in to change notification settings - Fork 15
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
LabelBOT #1012
base: master
Are you sure you want to change the base?
Conversation
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.
Please don't implement all the logic as helper methods. Since the logic is used only in the single controller (for now), implement it as (protected) controller methods there.
Also please us camelCase for variable names.
Finally, please fix the failing checks (except the test-current check which fails because biigle/largo is not there). The lint checks can be run locally with composer lint
and composer fix
.
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.
Just minor comments left now. We have to make sure that we get the exact queries here. Maybe you can dump the two queries as I explained below and post them here for comparison?
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.
Looks fine so far (ignoring the missing TODOs). Please go ahead 😉
@mzur what do you think about the last three points of TODO? |
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.
The query must always be limited to the label trees of the project. Otherwise users might see labels of other users which they are not allowed to see. If no labels exist, the result is empty and that's ok. The UI will show an appropriate message if no label exists (i.e. LabelBOT can't be activated).
If the label tree contains only one label then the existing search will automatically return this label, right? No need to implement a special case for this.
config/labelbot.php
Outdated
| The B-Tree index is built on the label_tree_id column in the | ||
| image_annotation_label_feature_vectors table. | ||
*/ | ||
'B_Tree_ImgAnno_index_name' => 'image_annotation_label_feature_vectors_label_tree_id_index', |
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.
The label_tree_id
index is always there. It is created in a migration. You can just assume that it is there. Also the index name is fixed (by Laravel conventions). It should not be configurable.
config/labelbot.php
Outdated
| The HNSW index is built on the vector column in the | ||
| image_annotation_label_feature_vectors table. | ||
*/ | ||
'HNSW_ImgAnno_index_name' => 'image_annotation_label_feature_vectors_vector_idx', |
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.
The HNSW index will also be created in a migration and the name will be fixed. After the update, the migration is run and you can assume that the index exists.
okay, thanks. |
TODO
Backend
store
method inImageAnnotationController
requires alabel_id
in the request, but when LabelBOT is active, a request with a feature vector should be accepted without label_id.Frontend