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 attribute check for print_trainable_parameters method #1928

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

anch0vy
Copy link
Contributor

@anch0vy anch0vy commented Jul 15, 2024

Fix attribute check for print_trainable_parameters method

Description

This PR fixes an incorrect attribute check in the main training script. The original code was checking for the existence of a method call instead of the method itself.

Changes

  • Changed if hasattr(trainer.model, "print_trainable_parameters()") to if hasattr(trainer.model, "print_trainable_parameters")

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@BenjaminBossan BenjaminBossan 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 fixing this small error in the script.

@BenjaminBossan BenjaminBossan merged commit a019f86 into huggingface:main Jul 15, 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.

None yet

3 participants