Skip to content

Profiling example #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 19, 2025
Merged

Profiling example #4

merged 10 commits into from
May 19, 2025

Conversation

rogerkuou
Copy link
Contributor

@rogerkuou rogerkuou commented May 2, 2025

Set up experiments for profiling, as required in https://github.com/TUDelftGeodesy/DePSI_group/issues/88

@rogerkuou rogerkuou marked this pull request as ready for review May 13, 2025 08:59
@rogerkuou rogerkuou requested a review from Copilot May 13, 2025 08:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR sets up experiments for profiling the Arc Unwrapping algorithm using both loop‐based and Dask-based methods, as described in issue #88. Key changes include:

  • Adding a Dask-based unwrapping implementation (both script and notebook versions) to leverage parallel processing.
  • Including a loop-based unwrapping implementation (script and notebook) for baseline comparison.
  • Updating documentation in the README to describe profiling procedures and commands.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
profiling_example/lambda_unwrap_dask.py Adds a Dask-based parallel unwrapping script with process‐based scheduling.
profiling_example/lambda_unwrap_dask.ipynb Introduces a Jupyter notebook for debugging/visualizing the Dask-based implementation.
profiling_example/lambda.py Provides a loop-based unwrapping script for direct unwrapping execution.
profiling_example/lambda.ipynb Contains a notebook version of the loop-based unwrapping method for analysis.
profiling_example/README.md Updates documentation to explain profiling experiments using both approaches.

@rogerkuou
Copy link
Contributor Author

Hi @fnattino, in this PR I setup the profiling experiment.

The explaination of the files should be in README, including a link to the results. I put the discussion of the results in this discussion channel .

Can you review on the profiling method? Thanks

@rogerkuou rogerkuou requested a review from fnattino May 13, 2025 10:13
Copy link
Contributor

@fnattino fnattino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rogerkuou, looks good! I think the instructions on how to setup the profiler are very clear.

Only very small suggestions from my side, the main one being that the pyspy-speedscope outputs are in JSON format.

With respect to the results of the benchmark, maybe it is not surprising that the Dask implementation essentially does not give any improvement.

The initial benchmark seems to suggest a lot of time is spent as overhead in small np call. With the for loop and most of the time being spent within the Python interpreter (i.e. not within numpy functions, which release the GIL) the threading approach cannot give any benefit. Not sure about the processing approach, but it probably suffers from the overhead of the data being transferred from the main process to the workers and back..

Co-authored-by: Francesco Nattino <[email protected]>
@rogerkuou
Copy link
Contributor Author

Thanks @fnattino! I added your comments on the explaination to the discussion topic, and adapted your suggestions.

@rogerkuou rogerkuou merged commit b8337fc into main May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants