-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Stop using print
, start using logger
#681
Comments
Many Python libraries include logging modules, which dspy does not support yet. We may refer to such packages (e.g. transformers, litellm, optuna) to implement it if needed. |
loguru is a simple yet powerful library. |
I think logging would be great to add. I took a look at the above, and for transformers/litellm/optuna all use the Idk if this is a significant concern (I imagine it can be changed via config somehow), but I imagine we may want something that aligns with logging to ensure, all most of the logs play nicely with structlog is another popular option that wraps |
I threw a quick PR together with a lightweight structlog logger here: #684 |
+1 for loguru!! |
As discussed in #589 we have a lot of print statements around the code in dspy.
This stackoverflow question has a lot of good reasons for why we should use the standard practice of loggers instead:
The text was updated successfully, but these errors were encountered: