-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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
docs: change assert to raise and some small docs #26232
Conversation
Hi, in general we like to use |
So to catch more debugging information, I switch from using assert to raise. I believe the code I am working on is correct, @stevhliu. |
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.
Sorry I read it the wrong way, you're correct! The rest of the changes look good to me. 🙂
Can you try running make style
to fix the failing CI tests?
Hi @stevhliu, can you help me, I cannot run this command |
Yes, it looks like you're missing pip install -e ".[quality]" Then you should be able to run the |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
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.
Thanks @pphuc25! Pinging @LysandreJik for a final look :)
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.
Thank you for your changes @pphuc25, but let's focus on your changes from assert to raise statements for now.
Please revert the added comments/changes in logging statements; we want these scripts to be very minimal so we'll keep them the way they are currently for now.
Thank you!
Hi @LysandreJik, I have reverted them back. However, in run_mlm_no_trainer the logging do not have eval_loss, this seem the important one so user can know how well loss of their model is, I think we should keep add the eval_loss logging in that file. |
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.
I have written down the changes that should be reverted in my opinion, the rest (including the eval loss), can be kept!
Thanks!
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.
Thank you for your PR!
Hi,
I create a concise document outlining the process of improving code readability by replacing 'assert' statements with 'raise' statements, along with the addition of documentation and 'logger.info' statements.
I would like cc @stevhliu to review my PR.