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

Suppress Warnings via Python API? #893

Closed
dgrahn opened this issue Jul 13, 2023 · 4 comments
Closed

Suppress Warnings via Python API? #893

dgrahn opened this issue Jul 13, 2023 · 4 comments

Comments

@dgrahn
Copy link

dgrahn commented Jul 13, 2023

All,

I'm receiving a huge number of warnings that the Agenda size is too big. I'm OK ignore this warning, but I can't figure out how to do that from the python API.

I should clarify, that this is in the nbest_encode function of the SentencePieceProcessor, not during training.

Thanks in advance!

@dgrahn
Copy link
Author

dgrahn commented Jul 14, 2023

After searching the documentation and source code. It looks like this is not an option in the Python API. I'd be happy to add it if someone points me in the right direction.

@dgrahn
Copy link
Author

dgrahn commented Jul 14, 2023

@taku910 Apologies for the ping, but I wanted to make sure you saw that there was a commit almost ready for merge here.

I was able to expose the log levels as set_min_log_level and get_min_log_level. When I test it on the local machine using python setup.py bdist_wheel, it works fine.

Commit: dgrahn@89b8035

However, the actions fail because it says that sentencepiece::logging is not a part of sentencepiece.

Failed Action: https://github.com/dgrahn/sentencepiece/actions/runs/5557489770

If you tell me what updates to make, I'll prepare a pull request.

@taku910
Copy link
Collaborator

taku910 commented Dec 23, 2023

We are going to expose logging functions for python.

@taku910
Copy link
Collaborator

taku910 commented Feb 19, 2024

Fixed in v0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants