Skip to content

Commit

Permalink
ensure subtracting sets
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed Jun 24, 2021
1 parent 4220212 commit 9d697e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions emmet-builders/emmet/builders/vasp/materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def prechunk(self, number_splits: int) -> Iterable[Dict]:
self.logger.info("Finding tasks to process")
all_tasks = list(self.tasks.query(temp_query, [self.tasks.key]))

processed_tasks = self.materials.distinct("task_ids")
processed_tasks = set(self.materials.distinct("task_ids"))
to_process_tasks = {d[self.tasks.key] for d in all_tasks} - processed_tasks
to_process_forms = {
d["formula_pretty"]
Expand Down Expand Up @@ -142,7 +142,7 @@ def get_items(self) -> Iterator[List[Dict]]:
self.logger.info("Finding tasks to process")
all_tasks = list(self.tasks.query(temp_query, [self.tasks.key]))

processed_tasks = self.materials.distinct("task_ids")
processed_tasks = set(self.materials.distinct("task_ids"))
to_process_tasks = {d[self.tasks.key] for d in all_tasks} - processed_tasks
to_process_forms = {
d["formula_pretty"]
Expand Down

0 comments on commit 9d697e0

Please sign in to comment.