Skip to content

Commit

Permalink
Fix _very_ subtle bug in remote jobs with an op that takes a ConfigSet
Browse files Browse the repository at this point in the history
as its basic input, rather than an Atoms object
  • Loading branch information
bernstei committed Feb 12, 2025
1 parent b1cdb70 commit d9c2324
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions wfl/autoparallelize/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ def do_remotely(autopara_info, iterable=None, outputspec=None, op=None, rng=None
if isinstance(iterable, ConfigSet):
job_iterable = ConfigSet(item_list)
else:
# for a subtle reason, passing an object with a loc to the remote function
# leads the remote do_in_pool to return a ConfigSet with empty containers
# for all earlier ConfigSet_loc, which confuses the code that processes the remote
# job results. If isinstance(item, Atoms), this info is remove automatically
# when item_list is turned into a ConfigSet (just above). However, if item is a ConfigSet
# we must do this manually here
for item in item_list:
if isinstance(item, ConfigSet):
item._enclosing_loc = ''
job_iterable = item_list
co = OutputSpec()

Expand Down

0 comments on commit d9c2324

Please sign in to comment.