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

Fix test fetcher #36129

Merged
merged 3 commits into from
Feb 12, 2025
Merged

Fix test fetcher #36129

merged 3 commits into from
Feb 12, 2025

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Feb 11, 2025

What does this PR do?

After #35167, the __init__ under each model directory don't import stuff from the python files inside it. The test fetcher has since trouble to get the right dependencies, and our CircleCI is sometimes not running any actual tests.

This PR uses define_import_structure to fix the issue

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

LGTM but lysandre is more familiar with this!

Copy link
Member

@LysandreJik LysandreJik 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 Yih-Dr!

@ydshieh
Copy link
Collaborator Author

ydshieh commented Feb 12, 2025

There is one failure

tests/repo_utils/test_tests_fetcher.py::TestFetcherTester::test_create_reverse_dependency_map - ValueError:KeyError:src/transformers/models/bert/tokenization_bert.py. From src/transformers/models/bert/init.py

I will adjust the test and merge.

@ydshieh ydshieh merged commit 4a5a7b9 into main Feb 12, 2025
24 of 26 checks passed
@ydshieh ydshieh deleted the fix_fetcher branch February 12, 2025 16:35
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