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 some missing tests in circleci #33559

Merged
merged 6 commits into from
Sep 20, 2024
Merged

Fix some missing tests in circleci #33559

merged 6 commits into from
Sep 20, 2024

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Sep 18, 2024

What does this PR do?

Run tests in tests/generation etc. in a new job

utils/tests_fetcher.py Outdated Show resolved Hide resolved
utils/tests_fetcher.py Outdated Show resolved Hide resolved
@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.

Comment on lines +315 to +321
non_model_job = CircleCIJob(
"non_model",
docker_image=[{"image": "huggingface/transformers-torch-light"}],
marker="not generate",
parallelism=6,
pytest_num_workers=8,
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like this!

@@ -1148,6 +1148,7 @@ def parse_commit_message(commit_message: str) -> Dict[str, bool]:
"pipelines_torch": r"tests/models/.*/test_modeling_(?!(?:flax_|tf_)).*",
"tests_hub": r"tests/.*",
"tests_onnx": r"tests/models/.*/test_modeling_(?:tf_|(?!flax)).*",
"tests_non_model": r"tests/[^/]*?/test_.*\.py",
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should make sure we filter to not pass in the test_modeling_llama only test_modeling_utils wdyt?

Copy link
Collaborator Author

@ydshieh ydshieh Sep 18, 2024

Choose a reason for hiding this comment

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

It's already the case:

This re r"tests/[^/]*?/test_.*\.py" won't include test_modeling_llama (which is inside tests/models), because it excludes the 2nd/ using [^/]

Copy link
Collaborator

Choose a reason for hiding this comment

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

ahh okay all good for me then!

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.

Thanks @ydshieh !

@ydshieh
Copy link
Collaborator Author

ydshieh commented Sep 20, 2024

Hi @gante !

The PR #33219 has a change

        # Special case: some models have generation attributes set in the decoder. Use them if still unset in the
        # generation config (which in turn is defined from the outer attributes of model config).
        decoder_config = model_config.get_text_config(decoder=True)

which cause

        config_dict = model_config.to_dict()
        # generation config (which in turn is defined from the outer attributes of model config).
>       decoder_config = model_config.get_text_config(decoder=True)
E       AttributeError: 'GenerationConfig' object has no attribute 'get_text_config'

src/transformers/generation/configuration_utils.py:1240: AttributeError
================================================================================ short test summary info =================================================================================FAILED tests/generation/test_configuration_utils.py::GenerationConfigTest::test_initialize_new_kwargs - AttributeError: 'GenerationConfig' object has no attribute 'get_text_config' 

Could you take a look 🙏 ?

@ydshieh
Copy link
Collaborator Author

ydshieh commented Sep 20, 2024

Somehow a bit strange model_config is a GenerationConfig ... 🤔

@ydshieh ydshieh merged commit 077b552 into main Sep 20, 2024
26 checks passed
@ydshieh ydshieh deleted the fix_missing_circleci branch September 20, 2024 18:58
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