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

Changing of loglevel during update_embeddings is misleading #6553

Closed
1 task done
laffeychris opened this issue Dec 14, 2023 · 0 comments
Closed
1 task done

Changing of loglevel during update_embeddings is misleading #6553

laffeychris opened this issue Dec 14, 2023 · 0 comments
Labels
1.x P3 Low priority, leave it in the backlog wontfix This will not be worked on

Comments

@laffeychris
Copy link

laffeychris commented Dec 14, 2023

Describe the bug
The line here logging.getLogger(__name__).setLevel(logging.CRITICAL) changes the log level from INFO to CRITICAL.
This leads to the first call to update_embeddings being logged, (e.g. "Updating embeddings for all 1 docs without embeddings.."), but all subsequent calls to update_embeddings are not logged.

This is quite misleading, and I assumed there was a bug in the code where my embeddings were not being updated, leading me to spend a few hours investigating.

Expected behavior
Principal of least surprise - don't change log levels as part of a standard function call. We should be able to see these logs on all subsequent calls to update_embeddings, not just the first.

Can we just remove this call to logging.getLogger(__name__).setLevel(logging.CRITICAL) which changes the log level? Why are we doing this in the first place?

Thanks in advance!

To Reproduce

  1. Call update_embeddings
  2. Call it again

FAQ Check

System:

  • OS: mac
  • GPU/CPU: gpu
  • Haystack version (commit or version number): 1.22.1
  • DocumentStore: ElasticSearch/Opensearch
  • Reader: N/A
  • Retriever: N/A
@masci masci added 1.x P2 Medium priority, add to the next sprint if no P1 available labels Jan 11, 2024
@masci masci added this to the 1.x-LTS milestone Feb 23, 2024
@masci masci added P3 Low priority, leave it in the backlog and removed P2 Medium priority, add to the next sprint if no P1 available labels Mar 22, 2024
@masci masci added the wontfix This will not be worked on label May 7, 2024
@masci masci closed this as completed May 7, 2024
@masci masci removed this from the 1.x-LTS milestone May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x P3 Low priority, leave it in the backlog wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants