Home / Function/ flattened_runs() — langchain Function Reference

flattened_runs() — langchain Function Reference

Architecture documentation for the flattened_runs() function in test_runnable.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  7e35ef39_76e4_058a_5abf_bdf57330a923["flattened_runs()"]
  1c72b396_ff94_2618_42c3_843ec828f717["FakeTracer"]
  7e35ef39_76e4_058a_5abf_bdf57330a923 -->|defined in| 1c72b396_ff94_2618_42c3_843ec828f717
  8687e1ce_52dc_9159_8f32_e8e69e257df8["run_ids()"]
  8687e1ce_52dc_9159_8f32_e8e69e257df8 -->|calls| 7e35ef39_76e4_058a_5abf_bdf57330a923
  style 7e35ef39_76e4_058a_5abf_bdf57330a923 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/runnables/test_runnable.py lines 168–176

    def flattened_runs(self) -> list[Run]:
        q = [*self.runs]
        result = []
        while q:
            parent = q.pop()
            result.append(parent)
            if parent.child_runs:
                q.extend(parent.child_runs)
        return result

Domain

Subdomains

Called By

Frequently Asked Questions

What does flattened_runs() do?
flattened_runs() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_runnable.py.
Where is flattened_runs() defined?
flattened_runs() is defined in libs/core/tests/unit_tests/runnables/test_runnable.py at line 168.
What calls flattened_runs()?
flattened_runs() is called by 1 function(s): run_ids.

Analyze Your Own Codebase

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

Try Supermodel Free