Home / Function/ _print_bar() — langchain Function Reference

_print_bar() — langchain Function Reference

Architecture documentation for the _print_bar() function in progress.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  1a06c0ec_3a65_38c7_efa5_66cac1eec4cf["_print_bar()"]
  8f7245e3_8bd3_bce9_4868_73ea9b0cf467["ProgressBarCallback"]
  1a06c0ec_3a65_38c7_efa5_66cac1eec4cf -->|defined in| 8f7245e3_8bd3_bce9_4868_73ea9b0cf467
  fa184006_711f_00be_ca5a_3ffdcca482e4["__init__()"]
  fa184006_711f_00be_ca5a_3ffdcca482e4 -->|calls| 1a06c0ec_3a65_38c7_efa5_66cac1eec4cf
  d3fbccba_a17d_4737_e36f_b0c86b86e89e["increment()"]
  d3fbccba_a17d_4737_e36f_b0c86b86e89e -->|calls| 1a06c0ec_3a65_38c7_efa5_66cac1eec4cf
  style 1a06c0ec_3a65_38c7_efa5_66cac1eec4cf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/smith/evaluation/progress.py lines 43–49

    def _print_bar(self) -> None:
        """Print the progress bar to the console."""
        progress = self.counter / self.total
        arrow = "-" * int(round(progress * self.ncols) - 1) + ">"
        spaces = " " * (self.ncols - len(arrow))
        end = "" if self.counter < self.total else self.end_with
        print(f"\r[{arrow + spaces}] {self.counter}/{self.total}", end=end)  # noqa: T201

Domain

Subdomains

Frequently Asked Questions

What does _print_bar() do?
_print_bar() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/smith/evaluation/progress.py.
Where is _print_bar() defined?
_print_bar() is defined in libs/langchain/langchain_classic/smith/evaluation/progress.py at line 43.
What calls _print_bar()?
_print_bar() is called by 2 function(s): __init__, increment.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free