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 check_models_are_tested to deal with Windows path #16973

Merged

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Apr 27, 2022

What does this PR do?

TEST_FILES_WITH_NO_COMMON_TESTS contains forward slash like mt5/test_modeling_flax_mt5.py.

The condition if test_file in TEST_FILES_WITH_NO_COMMON_TESTS: in check_models_are_tested would give failures to fix on Windows, like

camembert\test_modeling_camembert.py should define `all_model_classes` to apply common tests

This PR uses test_file.replace(os.sep, "/") to make it work on Windows too 😄

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 27, 2022

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

@ydshieh ydshieh requested a review from sgugger April 27, 2022 19:44
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.

Works for me!

utils/check_repo.py Outdated Show resolved Hide resolved
@ydshieh ydshieh merged commit 1f9e862 into huggingface:main Apr 28, 2022
@ydshieh ydshieh deleted the fix_check_models_are_tested_with_win_path branch April 28, 2022 13:32
elusenji pushed a commit to elusenji/transformers that referenced this pull request Jun 12, 2022
…#16973)

* fix

* Apply suggestions from code review

Co-authored-by: ydshieh <[email protected]>
Co-authored-by: Sylvain Gugger <[email protected]>
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