def setUp(self) -> None: ray_init_localhost()
def setUp(self) -> None: cpus = cpu_count() ray_init_localhost(num_cpus=cpus) self.pool = Pool(cpus) self.removeTree() coverage.process_startup() # necessary for coverage testing to work in parallel
def setUp(self) -> None: ray_init_localhost(num_cpus=2)
start_time = timer() cvrs = read_dominion_csv(cvrfile) if cvrs is None: print(f"Failed to read {cvrfile}, terminating.") exit(1) rows, cols = cvrs.data.shape parse_time = timer() print( f" Parse time: {parse_time - start_time: .3f} sec, {rows / (parse_time - start_time):.3f} ballots/sec" ) print(f" Found {rows} CVRs in {cvrs.metadata.election_name}.") if use_cluster: ray_init_cluster() ray_wait_for_workers() else: ray_init_localhost() tally_start = timer() rtally = ray_tally_everything( cvrs, verbose=False, secret_key=admin_state.keypair.secret_key, root_dir=tallydir, ) tally_end = timer() print( f"Tally rate: {rows / (tally_end - tally_start): .3f} ballots/sec") write_ray_tally(rtally, tallydir) print(f"Tally written to {tallydir}")