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

simplify scope tracking in burn-import #2207

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

skewballfox
Copy link
Contributor

@skewballfox skewballfox commented Aug 26, 2024

Pull Request Template

Checklist

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

Changes

Something from #2008 worth keeping around. Scopes was storing variable references as a vector, but then only storing one Tensor Variable in each entry. I changed scopes to be a single TensorVariable per entry. Makes it a little easier to understand at a glance.

the other change was to check the graph outputs and the graph inputs in the same iteration when scope checking. Since the graph is a DAG, that's guaranteed not to break.

Testing

I ran test -p burn-import, test -p onnx-test, and typos crates/burn-import. This should cover all the relevant test from run checks all

Copy link

codecov bot commented Aug 26, 2024

Codecov Report

Attention: Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.56%. Comparing base (79cd3d5) to head (1890d3a).
Report is 42 commits behind head on main.

Files with missing lines Patch % Lines
crates/burn-import/src/burn/scope.rs 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2207      +/-   ##
==========================================
- Coverage   85.93%   85.56%   -0.38%     
==========================================
  Files         695      707      +12     
  Lines       89032    89015      -17     
==========================================
- Hits        76514    76169     -345     
- Misses      12518    12846     +328     

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

@antimora antimora requested a review from laggui August 27, 2024 15:16
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! Just a small change needed (especially since it'll annoy clippy on the CI).

crates/burn-import/src/burn/scope.rs Outdated Show resolved Hide resolved
@skewballfox
Copy link
Contributor Author

@laggui somehow I forgot to push the changes when I made that comment. Just pushed them. It seems the current CI failure is coming from somewhere outside my changes

@laggui
Copy link
Member

laggui commented Sep 9, 2024

Yeah the failing CI is totally unrelated to your changes, will look into it.

@laggui laggui merged commit 9e9451b into tracel-ai:main Sep 9, 2024
9 of 10 checks passed
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.

2 participants