Home / Function/ __init__() — langchain Function Reference

__init__() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/langchain/langchain_classic/smith/evaluation/progress.py lines 17–35

    def __init__(
        self,
        total: int,
        ncols: int = 50,
        end_with: str = "\n",
    ):
        """Initialize the progress bar.

        Args:
            total: The total number of items to be processed.
            ncols: The character width of the progress bar.
            end_with: Last string to print after progress bar reaches end.
        """
        self.total = total
        self.ncols = ncols
        self.end_with = end_with
        self.counter = 0
        self.lock = threading.Lock()
        self._print_bar()

Domain

Subdomains

Calls

Frequently Asked Questions

What does __init__() do?
__init__() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/smith/evaluation/progress.py.
Where is __init__() defined?
__init__() is defined in libs/langchain/langchain_classic/smith/evaluation/progress.py at line 17.
What does __init__() call?
__init__() calls 1 function(s): _print_bar.

Analyze Your Own Codebase

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

Try Supermodel Free