def __init__(self, burnin: int = 10, ignore_unknown: bool = True, bounded: bool = True): self._burnin = to_number(burnin, min_n=0) self._ignore_unknown = to_logical(ignore_unknown) self._bounded = to_logical(bounded)
def __init__(self, tracker: Tracker, command: str, log: bool = False, linkpaths=None, envvars=None, arguments=None, socket=False, restart=False, onerror=None): super().__init__(tracker) self._command = command self._process = None self._tracker = tracker if linkpaths is None: linkpaths = [] if isinstance(linkpaths, str): linkpaths = linkpaths.split(os.pathsep) self._socket = to_logical(socket) self._restart = to_logical(restart) if not log: self._output = LogAggregator() else: self._output = None self._arguments = arguments self._onerror = onerror if sys.platform.startswith("win"): pathvar = "PATH" else: pathvar = "LD_LIBRARY_PATH" envvars[pathvar] = envvars[pathvar] + os.pathsep + os.pathsep.join(linkpaths) if pathvar in envvars else os.pathsep.join(linkpaths) envvars["TRAX"] = "1" self._envvars = envvars
def __init__(self, identifier: str, workspace: "Workspace", repetitions=1, early_stop=True, **kwargs): super().__init__(identifier, workspace, **kwargs) self._repetitions = to_number(repetitions, min_n=1) self._early_stop = to_logical(early_stop)