-
Notifications
You must be signed in to change notification settings - Fork 51
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
[RSDK-3634] Implement data.proto APIs that Add/Remove Tags #334
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.
One nit, but on first pass looks good!
@8ashar per this PR, |
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.
LGTM but I'm requesting that we change the user-facing API of the *_by_file_ids
methods to instead be *_by_ids
, and update the args/comments appropriately. The methods are changing name and we should fix the user-facing experience to match right away, then update the methods once the new protos go into effect.
See this pr for details.
Edit: in addition, we should change the actual argument structure. Right now we're passing file IDs (which are strings) into a deprecated file_id
field that isn't looked at. What we should pass are BinaryIDs (which are a proto type BinaryID
and which include, among other things, an optional file_id
) into the binary_id
field that is looked at.
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.
One comment that can definitely be pushed to a subsequent PR. Also: we should hold off on merging this until the data proto updates have been merged.
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.
We should coordinate release timing between this, the other data API PR, and the proto updates, but LGTM! Thanks for pulling this together.
src/viam/app/data/client.py
Outdated
GRPCError: if no binary_ids or tags are provided | ||
""" | ||
request = AddTagsToBinaryDataByIDsRequest(binary_ids=binary_ids, tags=tags) | ||
_: AddTagstoBinaryDataByIDsResponse = await self._data_client.AddTagsToBinaryDataByIDs(request, metadata=self._metadata) |
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.
oh tiny nit here, s/AddTagstoBinaryDataByIDsResponse/AddTags**T**oBinaryDataByIDsResponse
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.
oouh nice catch
This PR implements and adds docstrings to the gRPC methods that'll allow a DataClient to send a gGRPC request to app to add, remove, and retrieve tags. The PR also implements a function to retrieve bounding box labels. There are a few other minor changes throughout. Namely, some function signatures are updated to include defaults for certain parameters (i.e. empty filter), and the AppClient "close()" function is implemented with logging.