Open SMJMirza opened 2 weeks ago
The issue seems to be related to the version of Dask being used in the environment. The specified version in both conda-env.yml
and requirements.txt
is dask>=1.0
, which is outdated and may not support the functionalities required by the latest version of MiaplPy, especially for the "sequential" option in network inversion. Upgrading Dask to a more recent version should resolve compatibility issues and potentially fix the bug.
The bug is likely caused by the outdated version of Dask specified in the environment configuration files. The "sequential" option in network inversion might rely on newer features or bug fixes in Dask that are not present in version 1.0. Additionally, there might be compatibility issues between the older Dask version and the latest MiaplPy functionalities.
To address the issue, follow these steps:
Upgrade Dask: Update the Dask version in both conda-env.yml
and requirements.txt
to a more recent version, such as dask>=2021.0
.
Update conda-env.yml
:
dependencies:
- dask>=2021.0
- dask-jobqueue>=0.7
Update requirements.txt
:
dask>=2021.0
dask-jobqueue>=0.7
Test Compatibility: After upgrading, test the application to ensure that the "sequential" option in network inversion works correctly.
Enhance Error Handling and Logging: Modify src/miaplpy/network_inversion.py
to include better error handling and logging.
Example code snippet:
import logging
logging.basicConfig(level=logging.DEBUG)
try:
logging.info("Starting network inversion with arguments: %s", iargs)
ifgram_inversion_L1L2.main(iargs)
logging.info("Network inversion completed successfully.")
except Exception as e:
logging.error("Error during network inversion: %s", str(e))
raise
conda-env.yml
or requirements.txt
, particularly dask>=1.0
.By following these steps, you should be able to replicate the bug and verify that upgrading Dask resolves the issue.
Click here to create a Pull Request with the proposed solution
Files used for this task:
Hi @SMJMirza How many workers have you set for the inversion? I have not seen this error before and might not be miaplpy issue. Looks like the inversion is continuing despite the error @yunjunz probably has a better understanding, I suspect you have set a high number of workers but the extent of your data is not so big. You may be able to run it successfully with fewer number of workers
I would suggest re-running without dask. Another weird thing is that the ref_phase
is all zero, which means the reference pixel is at an invalid location.
@mirzaees @yunjunz
Thank you for sharing your solutions. Sorry, I mentioned the additional information of setting in the following:
miaplpy.multiprocessing.numProcessor = 8 mintpy.compute.cluster = local mintpy.compute.numWorker = 8 mintpy.compute.maxMemory = 32
The dimension of the study area is 0.005deg * 0.012deg in latitude and longitude. Exactly, it is not too big and covers a Dam we are monitoring using this approach. Interestingly, I will not face any issues with this setting when I use the "single_reference" network type. However, I will see this issue during the "sequential" network type.
I will try to test it without Dask. In terms of "reference point", do you think it can be invalid when I did not face any error in the "reference_point" step, even in the "single_reference" network type?
BTW, I just want to test the "sequential" network type and see if we can get the data point over the Embankment section of the Dam since this structure can be suspected of failure. Fortunately, we already got the interesting point from the "single_reference" network.
@yunjunz @mirzaees
I set the number of workers to 6 and ignored using the Desk to run the network of interferograms (sequential with 5 connections) for the new trying. In the attachment, you can see a screenshot of another error I got from the code during the "invert_network" step.
Do you have any suggestions about this issue? I can see that Sara used the sequential network of interferograms for her tests. So, I am not sure if there is any issue with this part of the package.
That's the real issue. @mirzaees may know better on this part.
@SMJMirza as I said I have not seen this error before but agreeing with Yunjun, the error says some values are incorrect. my next guess would be that some of the interferograms or all have not been created successfully for any reason, or the masks (conncomp mask or tempcoh mask) are zero. you mentioned the single reference was successful, so there should be some interruptions during your sequential run. I suggest checking your inputs for this step. unfortunately I can not help without further information and believe if the single reference was successful, there should not be any issue with sequential
@mirzaees Thank you for your points. As I checked the terminal comments of steps 1 to 7, I did not get any clear errors or issues. However, I did not check the generated IFGs or mask files specifically. I will check and let you know if I fixed it.
@mirzaees
I checked the maskConnComp, avgPhaseVelocity, and avgSpatialCoh and found them non-zero. In addition, it seems that the interferograms look normal with artifacts of unwrapping errors in several ones, which can be eliminated later. So, I am not sure about the source of this error I am watching for the "sequential" network style. Do you have any other suggestions? Or can I share any figures or plots to have your next advice?
Hi,
I am using the ISCE-coregistered SLCs from the Sentinel-1 for the MiaplPy to explore the deformation of the Dam infrastructure. Everything runs well when I select the "single_reference" network of IFGs. However, I tried to select the "sequential" option of the IFGs network and got the attached error during the network inversion. Could you please kindly guide me on this issue? I am unsure if it is a problem with the MialPy or the Dask version since they can work well in other cases.
ISCE version = 2.6.1 MiaplPy = latest version
Sincerely, Sayyed