Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
#!/usr/bin/env python
# coding: utf-8
# In[ ]:
import time
from dask.distributed import Client
def compute_time(data, full_data):
processors = [10, 20]
time_per_processor = {}
for proc in processors:
print(f"\n\n\nCommencing computation with {proc} processors...\n\n\n")
client = Client(n_workers = proc)
start_time = time.time()
clean_populations(data, full_data)
computation_time = time.time() - start_time
time_per_processor[proc] = computation_time
print(f"\n\n\nComputation time with {proc} processors: {computation_time} seconds\n\n\n")
print("\n\n\n", time_per_processor, "\n\n\n")
compute_time(data_df, full_data)