MCPcopy Create free account
hub / github.com/pytorch/executorch / get_bash_command

Method get_bash_command

backends/cadence/runtime/executor.py:139–151  ·  view source on GitHub ↗
(
        executable: str,
        cmd_args: Optional[Dict[str, str]] = None,
    )

Source from the content-addressed store, hash-verified

137
138 @staticmethod
139 def get_bash_command(
140 executable: str,
141 cmd_args: Optional[Dict[str, str]] = None,
142 ) -> List[str]:
143 # go through buck config and turn the dict into a list of "{key}=={value}"
144 if cmd_args is None:
145 cmd_args = {}
146
147 cmd_args_strs = []
148 for key, value in cmd_args.items():
149 cmd_args_strs.extend([f"--{key}={value}"])
150
151 return [executable] + cmd_args_strs
152
153
154@dataclass

Callers 1

__call__Method · 0.95

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected