Open MartinSJRogers opened 1 week ago
Could you maybe send your code (privately) so I can see whether this is relating to the datasets used? I haven't been able to replicate this behaviour so far, though using a different dataset I expect.
Have you run this code with a debugger? I'd like to check 1. Is it really hanging indefinitely, or just taking a long time, and if so 2. where is the freezing happening, is it actually in TaskLoader.__call__
?
Thanks @davidwilby I will send a private gist now. I haven't run this code with a debugger, I have just used my trusted print statements all over the place again. The print statements prove the code is hanging indefinitely/ taking a very long time when generating tasks, but I guess the debugger is needed to identify where in the actual DeepSensor codebase the code is hanging indefinitely? In the code I have sent you, if you set patching to False the code runs fine.
In running your example @MartinSJRogers , I've tracked the hanging behaviour down to this section of deepsensor.data.TaskLoader.task_generation
:
In this section keep_searching
is never being set to True for some or all of your patches I think, so this while
loop just runs indefinitely.
target_mask = added_mask & ~curr_mask
if isinstance(target_var, xr.Dataset):
keep_searching = np.all(target_mask.to_array().data == False)
else:
keep_searching = np.all(target_mask.data == False)
if keep_searching:
continue # No target points -- use a different `added_mask`
Description
The Taskloader function seems to freeze when asked to generate patched functions using the gapfill sampling strategy:
Reproduction steps
This first example runs fine
But if you call this example, nothing happens:
Version
Patchwise_train fork, monotonic errors branch,
Screenshots
OS
Windows