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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model summary: add 1 decimal place #4745

Merged
merged 5 commits into from
Nov 20, 2020
Merged

Conversation

jonashaag
Copy link
Contributor

@jonashaag jonashaag commented Nov 18, 2020

What does this PR do?

Show 1999 parameters as 1.9 K and 1000 parameters as 1.0 K, rather than both as 1 K.

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In in short, see following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified; Bugfixes should be including in bug-fix release milestones (m.f.X) and features should be included in (m.X.b) releases.

Did you have fun?

Make sure you had fun coding 馃檭

@edenlightning
Copy link
Contributor

mind adding a test for this?

@jonashaag
Copy link
Contributor Author

jonashaag commented Nov 18, 2020

The docs are the tests :) but I can add more tests if the change is accepted.

@awaelchli awaelchli added the feature Is an improvement or enhancement label Nov 18, 2020
@awaelchli
Copy link
Member

@jonashaag the doctest is sufficient, you just need to fix the decimal point in the other places where the model summary string is tested.

Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

it is a good point to show decimal when there is only 1 digit but later when you have thousands the meaning of decimal is meaningless >> 5,000.0

@jonashaag
Copy link
Contributor Author

I can add a special case for T if you want

@Borda
Copy link
Member

Borda commented Nov 19, 2020

I can add a special case for T if you want

I would say whatever is above 100 does not need decimal and lower than 100 shows one decimal

Show 1999 parameters as 1.9 K and 1000 parameters as 1.0 K, rather than both as 1 K.
@jonashaag
Copy link
Contributor Author

OK, please review again.

@codecov
Copy link

codecov bot commented Nov 19, 2020

Codecov Report

Merging #4745 (f620d6d) into master (b10b11d) will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #4745   +/-   ##
======================================
  Coverage      93%     93%           
======================================
  Files         117     117           
  Lines        8972    8974    +2     
======================================
+ Hits         8345    8347    +2     
  Misses        627     627           

Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

nice, thx :]

@Borda Borda added this to the 1.1 milestone Nov 19, 2020
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

Great addition ! Would you mind adding a test ?

@jonashaag
Copy link
Contributor Author

As said, the tests are in the docs (doctest) but if you want I can add separate unit tests.

@Borda Borda requested a review from tchaton November 20, 2020 16:32
@Borda Borda added ready PRs ready to be merged docs Documentation related labels Nov 20, 2020
@Borda Borda merged commit 8dfbf63 into Lightning-AI:master Nov 20, 2020
rohitgr7 pushed a commit that referenced this pull request Nov 21, 2020
Show 1999 parameters as 1.9 K and 1000 parameters as 1.0 K, rather than both as 1 K.

Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
@Borda Borda modified the milestones: 1.1, 1.0.x Nov 23, 2020
Borda pushed a commit that referenced this pull request Nov 23, 2020
Show 1999 parameters as 1.9 K and 1000 parameters as 1.0 K, rather than both as 1 K.

Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
(cherry picked from commit 8dfbf63)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related feature Is an improvement or enhancement ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants