Skip to content

Commit

Permalink
Update request seed on copy()
Browse files Browse the repository at this point in the history
  • Loading branch information
funkey committed Sep 3, 2023
1 parent 6652935 commit dfde284
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion gunpowder/batch_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def add(self, key, shape, voxel_size=None, directed=None, placeholder=False):

def copy(self):
"""Create a copy of this request."""
return copy.deepcopy(self)
request_copy = copy.deepcopy(self)
request_copy._update_random_seed()
return request_copy

def is_deterministic(self):
"""Return true if a random seed has been set for this request."""
Expand Down
1 change: 0 additions & 1 deletion gunpowder/nodes/batch_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ def request_batch(self, request):
batch = None

try:
request._update_random_seed()

self.set_seeds(request)

Expand Down

0 comments on commit dfde284

Please sign in to comment.