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 return dict false test and bug fix #1948

Merged
merged 4 commits into from
Feb 9, 2023

Conversation

dakinggg
Copy link
Contributor

@dakinggg dakinggg commented Feb 6, 2023

What does this PR do?

Fixes an issue introduced in 0.12.1 where HuggingFaceModel crashes if config.return_dict = False. The code assumed that that outputs was None in eval_forward, but this is not the case during training, when the cached train outputs are used. Also adds a test for this setting.

What issue(s) does this change relate to?

Closes CO-1743

Before submitting

  • Have you read the contributor guidelines?
  • Was this change discussed/approved in a GitHub issue first? It is much more likely to be merged if so.
  • Did you update any related docs and document your change?
  • Did you update any related tests and add any new tests related to your change? (see testing)
  • Did you run the tests locally to make sure they pass?
  • Did you run pre-commit on your change? (see the pre-commit section of prerequisites)

@dakinggg dakinggg requested a review from a team as a code owner February 6, 2023 21:43
Copy link
Contributor

@alextrott16 alextrott16 left a comment

Choose a reason for hiding this comment

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

LGTM

@dakinggg dakinggg requested a review from mvpatel2000 February 6, 2023 22:20
@dakinggg dakinggg merged commit b48551d into mosaicml:dev Feb 9, 2023
@dakinggg dakinggg deleted the hf_return_dict_false branch September 9, 2023 22:47
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.

3 participants