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

Add type hints to core.py #1097

Merged
merged 4 commits into from
Dec 22, 2023

Conversation

zachschillaci27
Copy link
Contributor

Hi all,

Just a quick PR to add type hinting to core.py

I noticed a few methods are not currently used in the codebase, such as build_bert_batch_from_txt and listify_batch. Not sure if they are being used elsewhere or we should clean them up. Let me know!

Zach

@lvwerra
Copy link
Member

lvwerra commented Dec 21, 2023

Hi @zachschillaci27, thanks for helping cleanup. Indeed those functions are not used anymore and can be removed!

@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.

@zachschillaci27
Copy link
Contributor Author

Hi @zachschillaci27, thanks for helping cleanup. Indeed those functions are not used anymore and can be removed!

Got it, done!

@lvwerra
Copy link
Member

lvwerra commented Dec 21, 2023

Could you run make precommit (requires pre-commit to be installed) to fix the code quality checks?

Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

Great clean up ! Thanks !

@younesbelkada younesbelkada merged commit 6ef785a into huggingface:main Dec 22, 2023
9 checks passed
@zachschillaci27 zachschillaci27 deleted the type-hint-core branch December 22, 2023 16:05
lapp0 pushed a commit to lapp0/trl that referenced this pull request May 10, 2024
* Add type hinting to core.py functions

* Fixes

* Remove unused functions

* Remove unused import
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.

4 participants