Skip to content

Fix some missing tests in circleci#33559

Merged
ydshieh merged 6 commits intomainfrom
fix_missing_circleci
Sep 20, 2024
Merged

Fix some missing tests in circleci#33559
ydshieh merged 6 commits intomainfrom
fix_missing_circleci

Conversation

@ydshieh
Copy link
Copy Markdown
Collaborator

@ydshieh ydshieh commented Sep 18, 2024

What does this PR do?

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

Comment thread utils/tests_fetcher.py Outdated
Comment thread utils/tests_fetcher.py Outdated
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

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
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like this!

Comment thread utils/tests_fetcher.py
"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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 ydshieh force-pushed the fix_missing_circleci branch from 0dc6063 to cd0e800 Compare September 20, 2024 09:18
@ydshieh
Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

ydshieh commented Sep 20, 2024

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

@ydshieh ydshieh force-pushed the fix_missing_circleci branch from cd0e800 to 4e52906 Compare September 20, 2024 17:20
@ydshieh ydshieh merged commit 077b552 into main Sep 20, 2024
@ydshieh ydshieh deleted the fix_missing_circleci branch September 20, 2024 18:58
BernardZach pushed a commit to BernardZach/transformers that referenced this pull request Dec 5, 2024
* fix

* fix

* fix

* fix

* skip

* skip more

---------

Co-authored-by: ydshieh <ydshieh@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