general
最后更新
hubai_sdk.utils.general函数
is_cli_call
Python
1def is_cli_call() -> bool:is_pip_package
Python
1def is_pip_package(filepath: str = __name__) -> bool:filepath(str): 要检查的文件路径。
bool: 文件是否是已安装包的一部分。
sanitize_net_name
Python
1def sanitize_net_name(name: str, with_suffix: bool = False) -> str:name(str): 要清理的名称或路径。with_suffix(bool): 是否保留后缀(文件扩展名)而不对其进行清理。
str
significant_update_available
Python
1def significant_update_available(cur: Version, new: Version) -> bool:version_check
Python
1def version_check(current_version: str):