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

Improve pickle (CandleTensor) conversions to NestedValue #1944

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

antimora
Copy link
Collaborator

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.

Related Issues/PRs

Fixes #1773

Changes

  1. Made value attribute of TensorData public
  2. Manually serialize tensor

Testing

  1. All unit tests passing
  2. Manually tested whisper model conversion.

Here are time improvements:

Old version:
cargo run --bin convert --release
0.98s user 0.11s system 89% cpu 1.217 total

cargo run --bin convert (DEBUG)
12.21s user 0.14s system 88% cpu 13.960 total

New version:
cargo run --bin convert --release
0.68s user 0.10s system 86% cpu 0.903 total

cargo run --bin convert (DEBUG)
9.19s user 0.14s system 85% cpu 10.943 total

44% improvement for the release mode.

@antimora antimora requested a review from laggui June 29, 2024 20:30
Copy link

codecov bot commented Jun 29, 2024

Codecov Report

Attention: Patch coverage is 86.48649% with 5 lines in your changes missing coverage. Please review.

Project coverage is 85.05%. Comparing base (98a58c8) to head (b9d5f09).
Report is 6 commits behind head on main.

Files Patch % Lines
crates/burn-tensor/src/tensor/data.rs 72.22% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1944   +/-   ##
=======================================
  Coverage   85.04%   85.05%           
=======================================
  Files         793      793           
  Lines       94590    94601   +11     
=======================================
+ Hits        80442    80460   +18     
+ Misses      14148    14141    -7     

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

@antimora antimora requested a review from nathanielsimard July 1, 2024 18:15
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.

🚀 🚀

Awesome, thanks for making the changes!

@nathanielsimard nathanielsimard merged commit 2bb7628 into tracel-ai:main Jul 2, 2024
14 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.

Improve pickle (CandleTensor) conversions to NestedValue
3 participants