subprocess
最后更新
hubai_sdk.utils.subprocess类
SubprocessResult
方法
init
Python
1def __init__(*args, peak_memory: int, total_time: float, **kwargs):属性
peak_memory
total_time
函数
subprocess_run
Python
1def subprocess_run(cmd: str | list[str], *, silent: bool = False) -> SubprocessResult:cmd(str | list[str]): 要执行的命令。字符串或参数列表。silent(bool): 如果为 True,则抑制日志。
SubprocessResult: 带有 .peak_memory 属性的 SubprocessResult。