Skip to content
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

Automatic Inference of attach_index #14

Merged
merged 2 commits into from
Feb 24, 2024
Merged

Conversation

kozlov721
Copy link
Collaborator

@kozlov721 kozlov721 commented Feb 22, 2024

Automatic attach_index

Added a functionality to automatically infer sensible attach index based on the type signature of forward method. Therefore, the attach_index doesn't have to be defined by the user if correct type annotations are present.

If the forward method has an annotated inputs, input, or x parameter, the type annotation is used to infer a sensible value for attach_index. This will be either "all" for inputs: list[Tensor] or -1 for inputs: Tensor. "all" also stays the default if unable to infer or not specified.

@kozlov721 kozlov721 added the enhancement New feature or request label Feb 22, 2024
@kozlov721 kozlov721 self-assigned this Feb 22, 2024
Copy link

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
4429 3524 80% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
luxonis_train/nodes/base_node.py 75% 🟢
luxonis_train/nodes/bisenet_head.py 50% 🟢
luxonis_train/nodes/classification_head.py 100% 🟢
luxonis_train/nodes/contextspatial.py 25% 🟢
luxonis_train/nodes/efficientrep.py 97% 🟢
luxonis_train/nodes/implicit_keypoint_bbox_head.py 92% 🟢
luxonis_train/nodes/micronet.py 95% 🟢
luxonis_train/nodes/mobilenetv2.py 35% 🟢
luxonis_train/nodes/mobileone.py 12% 🟢
luxonis_train/nodes/resnet.py 96% 🟢
luxonis_train/nodes/rexnetv1.py 15% 🟢
luxonis_train/nodes/segmentation_head.py 100% 🟢
TOTAL 66% 🟢

updated for commit: 04c01be by action🐍

Copy link

Test Results

  6 files    6 suites   1h 16m 41s ⏱️
 32 tests  32 ✅ 0 💤 0 ❌
192 runs  192 ✅ 0 💤 0 ❌

Results for commit 04c01be.

Copy link
Collaborator

@conorsim conorsim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kozlov721 kozlov721 merged commit 0b51fa0 into dev Feb 24, 2024
10 checks passed
@kozlov721 kozlov721 deleted the feature/auto-attach-index branch February 24, 2024 09:10
kozlov721 added a commit that referenced this pull request Oct 9, 2024
* automatic inference of attach index based on type signature

* added inference for input and x names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants