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

CI logs contain a lot of warnings about unknown mark #6194

Closed
betatim opened this issue Dec 20, 2024 · 2 comments · Fixed by #6201
Closed

CI logs contain a lot of warnings about unknown mark #6194

betatim opened this issue Dec 20, 2024 · 2 comments · Fixed by #6201

Comments

@betatim
Copy link
Member

betatim commented Dec 20, 2024

While looking at a CI job output I noticed a lot of warnings like:

test_dask_tsvd.py:93
  /__w/cuml/cuml/python/cuml/cuml/tests/dask/test_dask_tsvd.py:93: PytestUnknownMarkWarning: Unknown pytest.mark.mg - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.mg

which I thought "oh well, this is easy to fix" - except when I looked at pyproject.toml there is already an entry for the mg mark. One mark is added in the conftest.py but I think this shouldn't overwrite the settings from the toml.

Does someone who knows more about how the tests are run have an idea why the config is maybe not found/respected?

@jameslamb
Copy link
Member

Maybe this pytest.ini is causing the pytest options from pyproject.toml to be ignored?

https://github.com/rapidsai/cuml/blob/branch-25.02/python/cuml/cuml/tests/pytest.ini

I suspect consolidating everything into pyproject.toml and deleting pytest.ini would help.

@jameslamb
Copy link
Member

Yep I think "having pytest configuration in both pytest.ini and pyproject.toml" was the issue! Consolidating into pyproject.toml, I no longer see those warnings in test logs.

Opened #6201 with that change

@rapids-bot rapids-bot bot closed this as completed in #6201 Jan 9, 2025
rapids-bot bot pushed a commit that referenced this issue Jan 9, 2025
fixes #6194

Wheel tests in this project are emitting tons of warnings like this:

> test_random_forest.py:1247
  /__w/cuml/cuml/python/cuml/cuml/tests/test_random_forest.py:1247: PytestUnknownMarkWarning: Unknown pytest.mark.memleak - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.memleak

I think that's because the introduction of a `pytest.ini` file in #6078 resulted in all of the `pytest` options from `pyproject.toml` being ignored.

From https://docs.pytest.org/en/stable/reference/customize.html#pytest-ini

> pytest.ini files take precedence over other files, even when empty.

I think "take precedence" there means that if `pytest` finds a `pytest.ini`, it stops searching for other configuration files.

Authors:
  - James Lamb (https://github.com/jameslamb)
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Tim Head (https://github.com/betatim)
  - Jake Awe (https://github.com/AyodeAwe)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #6201
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 a pull request may close this issue.

2 participants