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

Update hyperparameter_search.py #24515

Merged
merged 2 commits into from
Jun 27, 2023
Merged

Update hyperparameter_search.py #24515

merged 2 commits into from
Jun 27, 2023

Conversation

pacman100
Copy link
Contributor

@pacman100 pacman100 commented Jun 27, 2023

What does this PR do?

  1. PR Refactor hyperparameter search backends #24384 results in many tests failing related to HP Search. https://huggingface.slack.com/archives/C02CH2YP4EQ/p1687823783572709
  2. Error being tests/deepspeed/test_deepspeed.py::TrainerIntegrationDeepSpeed::test_hyperparameter_search (line 122) TypeError: is_available() missing 1 required positional argument: 'self' when default_hp_search_backend is called.
  3. This PR fixes it.

Tested this via:

export CUDA_VISIBLE_DEVICES="0"
export RUN_SLOW="yes"
export LOGLEVEL=INFO

cd transformers

pytest -sv tests/deepspeed/test_deepspeed.py::TrainerIntegrationDeepSpeed::test_hyperparameter_search

@pacman100 pacman100 requested review from ydshieh and sgugger June 27, 2023 09:07
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 27, 2023

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 the fix! Left a small comment.

src/transformers/hyperparameter_search.py Outdated Show resolved Hide resolved
@pacman100 pacman100 requested review from ydshieh and sgugger June 27, 2023 12:30
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 iterating!

Copy link
Collaborator

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

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

Thank you again.

For the scope (the goal) of this PR (to fix test failure), it's good to be merged.

I would say the other methods in those backend classes could (or should better) be static, but no need to touch them in this PR.

@pacman100 pacman100 merged commit bcf02ec into main Jun 27, 2023
@pacman100 pacman100 deleted the smangrul/hp-backend-fixes branch June 27, 2023 13:12
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