MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / test_fdconfig_nnode

Method test_fdconfig_nnode

tests/utils/test_config.py:34–55  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

32
33class TestConfig(unittest.TestCase):
34 def test_fdconfig_nnode(self):
35 parallel_config = ParallelConfig({"tensor_parallel_size": 16, "expert_parallel_size": 1})
36 graph_opt_config = GraphOptimizationConfig({})
37 cache_config = CacheConfig({})
38 load_config = LoadConfig({})
39 scheduler_config = SchedulerConfig({})
40 model_config = Mock()
41 model_config.max_model_len = 512
42 model_config.architectures = ["test_model"]
43 model_config.mm_max_tokens_per_item = None
44 fd_config = FDConfig(
45 parallel_config=parallel_config,
46 graph_opt_config=graph_opt_config,
47 load_config=load_config,
48 cache_config=cache_config,
49 scheduler_config=scheduler_config,
50 model_config=model_config,
51 ips=[get_host_ip(), "0.0.0.0"],
52 test_mode=True,
53 )
54 assert fd_config.nnode == 2
55 assert fd_config.is_master is True
56
57 def test_fdconfig_ips(self):
58 parallel_config = ParallelConfig({})

Callers

nothing calls this directly

Calls 7

ParallelConfigClass · 0.90
CacheConfigClass · 0.90
LoadConfigClass · 0.90
SchedulerConfigClass · 0.90
FDConfigClass · 0.90
get_host_ipFunction · 0.90

Tested by

no test coverage detected