-
Notifications
You must be signed in to change notification settings - Fork 631
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
[AA] Add select operator/wrapper #4696
Conversation
def sample_info(cb): | ||
|
||
def idx_in_batch_cb(sample_info): | ||
return np.array(cb(sample_info), dtype=np.int32) | ||
|
||
return fn.external_source(idx_in_batch_cb, batch=False) |
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.
It would be nice to have the op for that at some point. Just a general, unrelated comment.
Signed-off-by: Kamil Tokarski <ktokarski@nvidia.com>
25276e4
to
d2a3e29
Compare
!build |
CI MESSAGE: [7531110]: BUILD STARTED |
CI MESSAGE: [7531110]: BUILD FAILED |
!build |
CI MESSAGE: [7537860]: BUILD STARTED |
CI MESSAGE: [7537860]: BUILD FAILED |
CI MESSAGE: [7537860]: BUILD PASSED |
Signed-off-by: Kamil Tokarski <ktokarski@nvidia.com>
Category:
New feature (non-breaking change which adds functionality)
Description:
Adds
select
utility - meant to be used internally by automatic augmentation schemes. The meaning isselect(ops, op_idx, *args, **kwargs) = ops[op_idx](*args, **kwargs)
. It uses conditional execution for that.Additional information:
Part of AA lib: #4648
It loosely depends on the #4694 (it uses the wrapper for type annotation and testing).
Affected modules and functionalities:
Autograph integration with dali - so that it converts the auto_aug module too.
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: DALI-3230