Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Profiling example for Network unwrapping

This is an example of how to perform profiling on the Arc Unwrapping algorithms. In this example we used the so-called "LAMBDA method" developed by TUDelft, and use a wrapper function in DePSI to call the unwrapping algorithm.

File structure

  • lambda_unwrap.ipynb: Jupyter notebook for debugging and visualization
  • lambda_unwrap.py: Python script for running the unwrapping algorithm in a recursive loop
  • lambda_unwrap_dask.ipynb: Jupyter notebook for debugging dask method
  • lambda_unwrap_dask.py: Python script for running the same unwrapping algorithm with dask databags

Profiling the unwrapping algorithm

We use the py-spy package to profile the unwrapping algorithm. For example, we can use the following command to profile the unwrapping algorithm without dask

Loop method

py-spy record --output profile_loop_60pnts.json --idle --rate 5 --subprocesses --format speedscope python lambda_unwrap.py

Dask with processes scheduler:

In lambda_unwrap_dask.py configure:

# Configure dask scheduler
dask.config.set(scheduler="processes") 
py-spy record --output profile_dask_60pnts_processes.json --idle --rate 5 --subprocesses --format speedscope python lambda_unwrap_dask.py

Dask with threads scheduler:

# Configure dask scheduler
dask.config.set(scheduler="threads") 
py-spy record --output profile_dask_60pnts_threads.json --idle --rate 5 --subprocesses --format speedscope python lambda_unwrap_dask.py

Then you can visualize the profiling results using the speedscope web tool by uploading the corresponding JSON file.

Profiling results

The results for 5 points, 24 points and 60 points can be found at: this link