def __init__(
        self, idx: typing.Union[int, str], cmd: str, name: str, **kwargs
    ) -> None:
        """

        Parameters
        ----------
        idx : Union[int, str]
            unique id for the task
        cmd : str
            bash command for the task
        name : str
            alias name of the task
        """
        self._finished = False
        self._is_timeout = False
        self._failed = False
        self._idx = idx
        self._cmd = cmd
        self._name = name
        self._ret = None
        self._assigned_dev = None
        self._proc = None
        self._timestamp = 0
        self._stdout = ""
        self._stderr = ""
        self._kwargs = kwargs


        Parameters
        ----------
        idx : Union[int, str]
            unique id for the task
        cmd : str
            bash command for the task
        name : str
            alias name of the task
        
python/aitemplate/backend/task_runner.py