Skip to content

Commit

Permalink
Prevent ValueError in task initialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
ccuetom committed Nov 15, 2024
1 parent 3bb49b1 commit 0f23542
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion mosaic/core/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,11 @@ def __init__(self, proxy, method, *args, **kwargs):
self._remote = None

self.state_changed('pending')
self.remote_runtime

try:
self.remote_runtime
except ValueError:
pass

async def init(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion stride_examples/examples/homogeneous_elastic/forward_2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async def main(runtime):
sub_problem = problem.sub_problem(shot.id)
shot_wavelets = sub_problem.shot.wavelets

pde.clear_operators()
await pde.clear_operators()
traces = await pde(shot_wavelets, vp, vs, rho, problem=sub_problem, **config)

data_stride = traces.data.copy()
Expand Down

0 comments on commit 0f23542

Please sign in to comment.