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

Add ONNX op Random Normal Like #2441

Merged
merged 6 commits into from
Nov 4, 2024

Conversation

tiruka
Copy link
Contributor

@tiruka tiruka commented Oct 30, 2024

Pull Request Template

Checklist

  • Confirmed that run-checks all script has been executed.

Related Issues/PRs

#1714

Changes

This pull request introduces support for the RandomNormalLike operation in the burn-import crate. The most important changes include updating the supported ONNX operations, adding the necessary test files, and modifying the codebase to integrate the new operation.

Testing

run-checks all has passed and it succeeded in generating model with cargo r -- ./onnx-tests/tests/random_normal_like/random_normal_like.onnx ./out

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 95.12195% with 6 lines in your changes missing coverage. Please review.

Project coverage is 85.29%. Comparing base (bac4405) to head (ae7a825).
Report is 27 commits behind head on main.

Files with missing lines Patch % Lines
crates/onnx-ir/src/dim_inference.rs 77.27% 5 Missing ⚠️
crates/burn-import/src/onnx/to_burn.rs 95.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2441      +/-   ##
==========================================
+ Coverage   85.25%   85.29%   +0.03%     
==========================================
  Files         792      793       +1     
  Lines      104552   104646      +94     
==========================================
+ Hits        89140    89260     +120     
+ Misses      15412    15386      -26     

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

Copy link
Collaborator

@antimora antimora left a comment

Choose a reason for hiding this comment

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

Thank you for your ongoing contribution to enhance ONNX support!

I think overall looks good. However, this PR raises yet another issue with input shapes (discussed here previously: #2304 (comment)). In short, Burn tracks shapes dynamically but ONNX allows for static and dynamic shapes - we should get away from static shapes.

I am approving this PR with a condition that you file a new issue to enhance RandomLike that would figure out shapes dynamically. You can link and update this description to say it only handles static input shapes. And the other issue will refactor it. It will contain two action items: enhance Burn's tensor method with new random_like method and update this burn-import.

CCing @laggui @nathanielsimard

crates/burn-import/src/burn/node/random_normal_like.rs Outdated Show resolved Hide resolved
crates/burn-import/src/burn/node/random_normal_like.rs Outdated Show resolved Hide resolved
@antimora antimora mentioned this pull request Oct 30, 2024
2 tasks
@tiruka tiruka mentioned this pull request Nov 1, 2024
1 task
@tiruka tiruka changed the title Add onnx op random normal like Add ONNX op Random Normal Like Nov 1, 2024
@laggui laggui requested a review from antimora November 1, 2024 12:31
@laggui laggui merged commit 970b9dc into tracel-ai:main Nov 4, 2024
11 checks passed
@tiruka tiruka deleted the add-onnx-op-random-normal-like branch November 4, 2024 13:43
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