Coverage for / home / jenkins / .local / lib / python3.10 / site-packages / hyper_parallel / auto_parallel / config_adapter / __init__.py: 100%
6 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-07-06 05:41 +0800
« prev ^ index » next coverage.py v7.13.1, created at 2026-07-06 05:41 +0800
1# Copyright 2026 Huawei Technologies Co., Ltd
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14# ============================================================================
15"""Auto parallel strategy search configuration interfaces.
17Provides a pipeline for reading, validating, searching, and writing
18parallel strategy search configurations::
20 from hyper_parallel.auto_parallel.config_adapter import (
21 read_search_config, validate_strict, search_strategies,
22 )
24 config = read_search_config("search.yaml")
25 validate_strict(config)
26 result = search_strategies(config)
28 config.resolved_strategy = result
29 write_strategy_config(config, "output/strategy.json")
30"""
32from hyper_parallel.auto_parallel.config_adapter._normalized_config import ( # noqa: E402, F401
33 NormalizedConfig,
34 ValidationError,
35 ValidationSeverity,
36)
37from hyper_parallel.auto_parallel.config_adapter._config_loader import ( # noqa: E402
38 read_hp_yaml_config,
39 read_search_config,
40)
41from hyper_parallel.auto_parallel.config_adapter._search_runner import ( # noqa: E402
42 search_strategies,
43)
44from hyper_parallel.auto_parallel.config_adapter._constraint_checker import ( # noqa: E402
45 validate,
46 validate_strict,
47)
48from hyper_parallel.auto_parallel.config_adapter._strategy_output import ( # noqa: E402
49 normalized_to_summary,
50 write_ppb_config,
51 write_resolved_strategy,
52 write_resolved_yaml,
53 write_strategy_config,
54)
56__all__ = [
57 "NormalizedConfig",
58 "ValidationError",
59 "ValidationSeverity",
60 "normalized_to_summary",
61 "read_hp_yaml_config",
62 "read_search_config",
63 "search_strategies",
64 "validate",
65 "validate_strict",
66 "write_ppb_config",
67 "write_resolved_strategy",
68 "write_resolved_yaml",
69 "write_strategy_config",
70]