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

feat: added reduce min onnx import #1894

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

JachymPutta
Copy link
Contributor

Checklist

  • Confirmed that run-checks all script has been executed.
  • Made sure the book is up to date with changes in this PR.

Related Issues/PRs

Helps with #1714

Changes

Reduce min import based on the reduce max

Testing

Manual

cargo test -p burn-import --color=always -- --color=always
cargo test -p onnx-tests --color=always

Copy link

codecov bot commented Jun 15, 2024

Codecov Report

Attention: Patch coverage is 91.79104% with 11 lines in your changes missing coverage. Please review.

Project coverage is 86.09%. Comparing base (8bf1cd6) to head (283e0d8).
Report is 4 commits behind head on main.

Files Patch % Lines
crates/burn-import/src/onnx/op_configuration.rs 84.37% 5 Missing ⚠️
crates/burn-import/src/onnx/dim_inference.rs 80.95% 4 Missing ⚠️
crates/burn-import/src/burn/node/unary.rs 96.55% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1894      +/-   ##
==========================================
+ Coverage   86.07%   86.09%   +0.02%     
==========================================
  Files         781      781              
  Lines       91616    91822     +206     
==========================================
+ Hits        78861    79058     +197     
- Misses      12755    12764       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

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

Seems pretty similar to ReduceMax 😄

LGTM, just a minor comment. Will merge afterwards.

Comment on lines 16 to 21
# ReduceMax, keepdims=0, axes=None
torch.min(x),
# ReduceMax, keepdims=1, axes=[1]
torch.min(x, dim=1, keepdim=True).values,
# ReduceMax, keepdims=1, axes=[-1]
torch.min(x, dim=-1, keepdim=True).values,
Copy link
Member

@laggui laggui Jun 17, 2024

Choose a reason for hiding this comment

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

I'm assuming the comments are supposed to refer to ReduceMin?

We can change the comments to reflect the actual op.

@JachymPutta
Copy link
Contributor Author

Seems pretty similar to ReduceMax 😄

It was a great source of inspiration 😄

Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

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

LGTM! 🙂 thanks for the contribution

@nathanielsimard nathanielsimard merged commit 96468fc into tracel-ai:main Jun 18, 2024
14 checks passed
@Dirleye Dirleye mentioned this pull request Jul 1, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants