(cmd: List[str], cwd: Optional[str] = None, bg: bool = False)
| 101 | process.stdout.close() |
| 102 | |
| 103 | def run_command(cmd: List[str], cwd: Optional[str] = None, bg: bool = False) -> None: |
| 104 | process = subprocess.Popen(" ".join(cmd), cwd=cwd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
| 105 | |
| 106 | if bg: |
| 107 | # Create a separate thread to handle the printing of the process's output |
| 108 | threading.Thread(target=print_process_output, args=(process,), daemon=True).start() |
| 109 | return process.pid |
| 110 | else: |
| 111 | print_process_output(process) |
| 112 | assert process.wait() == 0 |
| 113 | |
| 114 | def get_ckpt_names_with_node_info(workflow_json: Union[Dict, List], is_windows: bool) -> List[ModelFileWithNodeInfo]: |
| 115 | ckpt_names = [] |
no test coverage detected