neural_compressor.ux.utils.executor
¶
Definition of executor.
Module Contents¶
Classes¶
Executor class provide execute shell command. |
- class neural_compressor.ux.utils.executor.Executor(workspace_path: str, subject: str, data: dict | None = None, send_response: bool = True, log_name: str | None = None, additional_log_names: List[str] = [])¶
Executor class provide execute shell command.
- property process_duration: float | None¶
Return duration of the process in [s].
- property workdir: str¶
Property concat workdir path.
- Returns:
workdir path
- property request_id: str | None¶
Property contain info about request.
- Returns:
request id
- property log_name: str | None¶
Property contain info about output file name.
- Returns:
requested log filename
- property additional_log_names: List[str]¶
Property contain info about additional output file names.
- Returns:
list of additional log filenames
- call_one(args: List[Any], logger: Any | None = None, executable: Any | None = None, shell: bool = False, cwd: str | None = None, env: dict | None = None, universal_newlines: bool = False, startupinfo: Any | None = None, creationflags: int = 0, processes: Any | None = None, ignore_exit_codes: list | Any = None, pid: str | None = None) None ¶
Execute single call for process.
- Parameters:
args –
logger –
executable –
shell –
cwd –
env –
universal_newlines –
startupinfo –
creationflags –
processes –
ignore_exit_codes –
pid –
- call(args: List[Any], logger: Any | None = None, executable: Any | None = None, shell: bool = False, cwd: str | None = None, env: dict | None = None, universal_newlines: bool = False, startupinfo: Any | None = None, creationflags: int = 0, env_args: dict | None = None, ignore_exit_codes: list | Any = None, pid: str | None = None) neural_compressor.ux.utils.processes.NCProcesses ¶
Execute multiple calls for process.
- Parameters:
args –
logger –
executable –
shell –
cwd –
env –
universal_newlines –
startupinfo –
creationflags –
ignore_exit_codes –
pid –
- refresh_workdir() str ¶
Property returns workdir method.
- Returns:
workdir path
- static is_multi_commands(args: list) bool ¶
Check type of execution.
- Parameters:
args – arguments for parser execution
- Returns:
bool value True if args are in list else False