Skip to content

Fix or silence warnings emitted by tests #305

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

Open
wants to merge 39 commits into
base: develop
Choose a base branch
from

Conversation

dagardner-nv
Copy link
Contributor

@dagardner-nv dagardner-nv commented May 20, 2025

Description

  • pytest now runs without reporting any warnings on 3.12 (there is a warning 3.11 that pytest is unable to silence), down from 46.
  • Update code to avoid several deprecation warnings (mostly Pydantic)
  • Silence warnings being emitted by weave that we have no control over (weave triggers PydanticDeprecatedSince20 wandb/weave#4533 & SentryHubDeprecationWarning wandb/weave#3666)
  • Add a dependency on langchain-community to aiqtoolkit-test needed for the DeterministicFakeEmbedding class (this is currently a transitory dep of ragas)
  • Renamed test classes beginning with Test which were not test classes, to prevent pytest from attempting to run them.
  • Avoid mocking the asyncio.run_coroutine_threadsafe method, this ensures that coroutines are awaited.
  • Update src/aiq/eval/evaluate.py such that coroutines are only started after passing the if not session_manager.workflow.has_single_output check, and in the event of an exception, cancel any running coroutines in the exception handler.
  • Ignore syntax warnings being emitted by qdrant-client used by mem0, remove once the fix for Invalid escape sequence produces SyntaxWarning on run qdrant/qdrant-client#983 is released.

Closes #308

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

…being unset

Signed-off-by: David Gardner <dagardner@nvidia.com>
…ing about this not being set. Remove definition of pytest_plugins this is not a supported pytest config and triggers a warning

Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
…classes to be collected

Signed-off-by: David Gardner <dagardner@nvidia.com>
…classes to be collected

Signed-off-by: David Gardner <dagardner@nvidia.com>
…re being emitted

Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
…ment

Signed-off-by: David Gardner <dagardner@nvidia.com>
…dependency on langchain-community (this is currently a transitory dep of ragas)

Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
…ove-warnings

Signed-off-by: David Gardner <dagardner@nvidia.com>
@dagardner-nv dagardner-nv self-assigned this May 20, 2025
@dagardner-nv dagardner-nv added bug Something isn't working non-breaking Non-breaking change labels May 20, 2025
@dagardner-nv dagardner-nv marked this pull request as draft May 20, 2025 23:07
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
@dagardner-nv dagardner-nv marked this pull request as ready for review May 21, 2025 14:40
Signed-off-by: David Gardner <dagardner@nvidia.com>
…use new fixture

Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
… pull_intermediate, avoids issue where pull_intermediate is left unawaited when the workflow has multiple outputs

Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
…ession_manager, avoids another warning about an unwaited coroutine

Signed-off-by: David Gardner <dagardner@nvidia.com>
@dagardner-nv dagardner-nv marked this pull request as draft May 21, 2025 21:12
@dagardner-nv dagardner-nv marked this pull request as ready for review May 21, 2025 21:24
…e) to avoid warning from the nim client

Signed-off-by: David Gardner <dagardner@nvidia.com>
… mem0), remove once qdrant/qdrant-client#983 is resolved

Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
…nore, since this warning was also bein emitted from other parts of the code base

Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
…ove-warnings

Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
@dagardner-nv dagardner-nv marked this pull request as draft May 22, 2025 15:03
Signed-off-by: David Gardner <dagardner@nvidia.com>
…thon 3.11

Signed-off-by: David Gardner <dagardner@nvidia.com>
@dagardner-nv dagardner-nv marked this pull request as ready for review May 22, 2025 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: coroutines not being awaited in tests
1 participant