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 classifier_dropout param for CrossEncoder. #2396

Conversation

PhilipMay
Copy link
Contributor

@PhilipMay PhilipMay commented Jan 4, 2024

This PR adds the option to set / change the classifier_dropout value. This way it is possible to set the dropout value of the classification head. This can be a very important hyperparameter for classification tasks (and also regression).

This is a non breaking change: When the classifier_dropout is None (the default) then nothing happens.

For more background please also see:

@PhilipMay
Copy link
Contributor Author

PhilipMay commented Jan 4, 2024

One unrelated test fails: FAILED tests/test_sentence_transformer.py::test_save_to_hub - TypeError: __init__() missing 1 required positional argument: 'pull_requests'

@tomaarsen do you know why?

@PhilipMay PhilipMay changed the title [WIP] Add classifier_dropout param for CrossEncoder. Add classifier_dropout param for CrossEncoder. Jan 4, 2024
@tomaarsen
Copy link
Collaborator

@PhilipMay I suspect that there's been a new release of huggingface_hub that changed the API for GitRefs that I use in one of the tests. I will look into this next week (as I'm off this week).

@PhilipMay
Copy link
Contributor Author

@PhilipMay I suspect that there's been a new release of huggingface_hub that changed the API for GitRefs that I use in one of the tests. I will look into this next week (as I'm off this week).

Many thanks @tomaarsen ! 🚀

@PhilipMay
Copy link
Contributor Author

@PhilipMay I suspect that there's been a new release of huggingface_hub that changed the API for GitRefs that I use in one of the tests. I will look into this next week (as I'm off this week).

Last release is from 20th Dec. 2023:

image

@PhilipMay
Copy link
Contributor Author

I found the bug and reported it: huggingface/huggingface_hub#1956

For this PR I applied a workaround.

@PhilipMay
Copy link
Contributor Author

CI is green - can be merged from my point of view. :-)

@tomaarsen
Copy link
Collaborator

This looks great, thanks! And feel free to share any trained models with me, I'm curious to see what you'll cook up :)

@tomaarsen tomaarsen merged commit fdef4ef into UKPLab:master Jan 8, 2024
8 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.

2 participants