File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33# SPDX-License-Identifier: Apache-2.0
44# Contact: qubitium@modelcloud.ai, x.com/qubitium
55
6- from defuser .utils .common import env_flag
6+ from defuser .utils .common import env_flag , warn_if_public_api_transformers_unsupported
7+ from logbar import LogBar
78
89DEBUG_ON = env_flag ("DEBUG" )
910
10- def convert_model (* args , ** kwargs ):
11+ logger = LogBar (__name__ )
12+
13+
14+ def convert_model (* args , ** kwargs ) -> bool :
1115 """Lazily import conversion entrypoint to avoid import-time cycles."""
16+ if warn_if_public_api_transformers_unsupported ("convert_model()" , logger ):
17+ return False
18+
1219 from .defuser import convert_model as _convert_model
1320
1421 return _convert_model (* args , ** kwargs )
1522
1623
17- def replace_fused_blocks (* args , ** kwargs ):
24+ def replace_fused_blocks (* args , ** kwargs ) -> bool :
1825 """Lazily import conversion entrypoint to avoid import-time cycles."""
26+ if warn_if_public_api_transformers_unsupported ("replace_fused_blocks()" , logger ):
27+ return False
28+
1929 from .defuser import replace_fused_blocks as _replace_fused_blocks
2030
2131 return _replace_fused_blocks (* args , ** kwargs )
You can’t perform that action at this time.
0 commit comments