KEMBAR78
Update check_models_are_tested to deal with Windows path by ydshieh · Pull Request #16973 · huggingface/transformers · GitHub
Skip to content

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!

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
@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 <ydshieh@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
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