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

Fix Sylvain's nits on the original KerasMetricCallback PR #18300

Merged
merged 3 commits into from Jul 26, 2022

Conversation

Rocketknight1
Copy link
Member

No description provided.

@Rocketknight1 Rocketknight1 changed the title Fix Sylvain's nits on the original PR Fix Sylvain's nits on the original KerasMetricCallback PR Jul 26, 2022
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jul 26, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Thanks for adding those!

Comment on lines 66 to 68
predict_with_generate (`bool`, *optional*, defaults to `False`):
predict_with_generate (`bool`, defaults to `False`):
Whether we should use `model.generate()` to get outputs for the model.
use_xla_generation (`bool`, *optional*, defaults to `False`):
Copy link
Collaborator

Choose a reason for hiding this comment

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

The optional should still be there in the docstring because the argument is optional in the sense it has a default value. It's just the type annotation Optional (which means Union None) that wasn't correct ;-)

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I never knew that was our rule for writing docstrings! Fixing.

src/transformers/keras_callbacks.py Outdated Show resolved Hide resolved
Rocketknight1 and others added 2 commits July 26, 2022 13:18
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
@Rocketknight1 Rocketknight1 merged commit 68097dc into main Jul 26, 2022
@Rocketknight1 Rocketknight1 deleted the xla_generation_callback branch July 26, 2022 16:08
oneraghavan pushed a commit to oneraghavan/transformers that referenced this pull request Sep 26, 2022
…e#18300)

* Fix Sylvain's nits on the original PR

* Update src/transformers/keras_callbacks.py

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* Re-add "optional" to docstring

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
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.

None yet

3 participants