I wrote this
@ray.remote def check(word, words): valid_ciphertexts =  for key in range(26): ciphertext = shift(word, key) if ciphertext in words: valid_ciphertexts.append(ciphertext) else: valid_ciphertexts.append(None) return valid_ciphertexts if __name__ == '__main__': words = set() with open(sys.argv, 'r') as lexicon: for word in lexicon: words.add(word.strip()) ray.init() results = ray.get([check.remote(word, words) for word in words]) with open(sys.argv, 'w', newline='') as f: writer = csv.writer(f) writer.writerow([key for key in range(26)]) writer.writerows(results)
I was expecting to see high usage across all my cores, due to parallelising the hundreds of thousands of calls to
check, but the dashboard is showing this:
Why is it like this?