Skip to content

dspy.enable_logging

dspy.enable_logging()

启用由DSPy中事件日志API使用的DSPyLoggingStream (eprint(), logger.info()等),发出所有后续事件日志。这 会撤销disable_logging()的效果。

Source code in dspy/utils/logging_utils.py
def enable_logging():
    """
    Enables the `DSPyLoggingStream` used by event logging APIs throughout DSPy
    (`eprint()`, `logger.info()`, etc), emitting all subsequent event logs. This
    reverses the effects of `disable_logging()`.
    """
    DSPY_LOGGING_STREAM.enabled = True

:::

优云智算