for key, item in classifier_functions.items() } for name in classification_dataset_names: for key in params: for x in params[key]: todos.add((name, key, x)) if options.resume: p = Path(resultdir) ids = list( map(lambda s: int(s.stem.split('-')[1]), p.glob("tmp-*.pkl"))) for i in ids: todos.complete(i) total = todos.size() print("found {} incomplete trials!".format(len(todos.remaining()))) clients = {} s = start_server(options.port) s.settimeout(1) print("Starting to listen...") s.listen(options.max_connections) while len(todos.completed()) != todos.size(): try: to_remove = [] for k in clients: if handle_client(clients, k) != None: to_remove.append(k) for item in to_remove: print("Removing {}".format(item)) if clients[item]['task'] != None: