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

Regression cli tests #772

Merged
merged 4 commits into from
Oct 18, 2022
Merged

Regression cli tests #772

merged 4 commits into from
Oct 18, 2022

Conversation

muellerzr
Copy link
Collaborator

Add accelerate launch tests

What does this add?

This PR introduces a subset of tests for checking accelerate launch and in turn accelerate config, and solves a bug I found during testing

Why is it needed?

Users have pointed out that we're not quite doing a good enough job with backwards compatibility checks on config yamls. To ensure these can be caught new tests are added to run a simple script using accelerate launch with no configuration file or specific configuration files

What parts of the API does this impact?

User-facing:

Nothing

Internal structure:

tests/test_configs should contain (at least) the last 2 major versions of Accelerate plus the latest version, which are direct outputs from accelerate config. Since these tests take so fast to execute, I think it's fine if this just contains the last 5 or 6 configs until we are comfortable.

Anticipated maintenance burden? (What will happen in say, 3 months if something changes)

As part of PR review, maintainers should be aware of any changes to the config file or CLI arguments and ensure that a new config is added to the folder for proper testing.

@muellerzr muellerzr added the enhancement New feature or request label Oct 18, 2022
@muellerzr muellerzr requested a review from sgugger October 18, 2022 14:51
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 18, 2022

The documentation is not available anymore as the PR was closed or merged.

@@ -489,7 +489,7 @@ def multi_gpu_launcher(args):

current_env = os.environ.copy()
gpu_ids = getattr(args, "gpu_ids")
if gpu_ids != "all":
if gpu_ids != "all" and args.gpu_ids is not None:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This addition is needed for the test case of CUDA_VISIBLE_DEVICES=""

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 a lot for working on this!

@muellerzr muellerzr merged commit 9114fb0 into main Oct 18, 2022
@muellerzr muellerzr deleted the regression-cli-tests branch October 18, 2022 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants