-
Notifications
You must be signed in to change notification settings - Fork 648
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
[nnx] improve toy examples #3813
Conversation
counts_ = updates.extract(Count) | ||
model = static.merge(params, counts) | ||
y_pred = model(x) | ||
_counts = model.extract(Count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the _
prefix? It is normally used (by convention) to indicate that a variable is unused, but here this isn't the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep counts_
then? Here we need a new variable name, cannot reuse counts
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extracted_counts or new_counts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new_counts
it is
05c5029
to
6d638e6
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3813 +/- ##
==========================================
+ Coverage 60.86% 61.04% +0.18%
==========================================
Files 105 105
Lines 13045 13098 +53
==========================================
+ Hits 7940 7996 +56
+ Misses 5105 5102 -3 ☔ View full report in Codecov by Sentry. |
What does this PR do?
Improves toy examples, makes them more idiomatic according to current standards.