Home / Function/ test_init_time() — langchain Function Reference

test_init_time() — langchain Function Reference

Architecture documentation for the test_init_time() function in chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  bbfbb38a_4f52_1486_3b1a_a2d72478330a["test_init_time()"]
  f4b40f56_1158_0e72_1cac_d0121e4eabd8["ChatModelUnitTests"]
  bbfbb38a_4f52_1486_3b1a_a2d72478330a -->|defined in| f4b40f56_1158_0e72_1cac_d0121e4eabd8
  454c7bc0_b7ba_c01c_6607_87da05bdc994["chat_model_class()"]
  bbfbb38a_4f52_1486_3b1a_a2d72478330a -->|calls| 454c7bc0_b7ba_c01c_6607_87da05bdc994
  style bbfbb38a_4f52_1486_3b1a_a2d72478330a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/standard-tests/langchain_tests/unit_tests/chat_models.py lines 1137–1148

    def test_init_time(self, benchmark: BenchmarkFixture) -> None:
        """Test initialization time of the chat model.

        If this test fails, check that
        we are not introducing undue overhead in the model's initialization.
        """

        def _init_in_loop() -> None:
            for _ in range(10):
                self.chat_model_class(**self.chat_model_params)

        benchmark(_init_in_loop)

Domain

Subdomains

Frequently Asked Questions

What does test_init_time() do?
test_init_time() is a function in the langchain codebase, defined in libs/standard-tests/langchain_tests/unit_tests/chat_models.py.
Where is test_init_time() defined?
test_init_time() is defined in libs/standard-tests/langchain_tests/unit_tests/chat_models.py at line 1137.
What does test_init_time() call?
test_init_time() calls 1 function(s): chat_model_class.

Analyze Your Own Codebase

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

Try Supermodel Free