X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=executors.py;h=34528a33c2d10236cd7527fe53ffd027fa8020ca;hb=6ba90a1f30f1c0cf4df12fcd0c62181f29bc3668;hp=990df03f19af253773c72e23eac201a9163e2931;hpb=a4bf4d05230474ad14243d67ac7f8c938f670e58;p=python_utils.git diff --git a/executors.py b/executors.py index 990df03..34528a3 100644 --- a/executors.py +++ b/executors.py @@ -2,33 +2,32 @@ from __future__ import annotations -from abc import ABC, abstractmethod import concurrent.futures as fut -from collections import defaultdict -from dataclasses import dataclass import logging -import numpy import os import platform import random import subprocess import threading import time -from typing import Any, Callable, Dict, List, Optional, Set import warnings +from abc import ABC, abstractmethod +from collections import defaultdict +from dataclasses import dataclass +from typing import Any, Callable, Dict, List, Optional, Set import cloudpickle # type: ignore +import numpy from overrides import overrides -from ansi import bg, fg, underline, reset import argparse_utils import config -from decorator_utils import singleton -from exec_utils import run_silently, cmd_in_background, cmd_with_timeout import histogram as hist +from ansi import bg, fg, reset, underline +from decorator_utils import singleton +from exec_utils import cmd_in_background, cmd_with_timeout, run_silently from thread_utils import background_thread - logger = logging.getLogger(__name__) parser = config.add_commandline_args(