Open
Conversation
Core Improvements: - Terrain Criteria: Implemented chunked slope calculation (utils.compute_slope_chunked) to resolve memory explosion issues with large point datasets. - Retrogression Analysis: - Implemented BFS optimization in landslide_retrogression for improved serial performance. - Added run_retrogression_parallel_grouped to handle interacting landslides correctly during parallel processing. - Added run_retrogression_parallel_adaptive to automatically select the best strategy (speed vs. accuracy). - Fixed buffer size issues in parallel cropping to ensure full landslide propagation. Refactoring & Docs: - Grouped parallel functions in retrogression.py and updated docstrings. - Consolidated performance findings into docs/PERFORMANCE_FINDINGS.md with neutral tone. - Removed obsolete documentation and READMEs. Verification: - Added scripts/run_and_compare_retrogression.py for verification. - Verified changes showing 0.0% difference from baseline.
… comparison script - Separated landslide_retrogression into landslide_retrogression_original and landslide_retrogression_optimized in src/losneomrade/retrogression.py. - Added scripts/compare_serial_performance.py to benchmark serial execution performance and accuracy. - Added plotly dependency to pyproject.toml. - Updated docs/RETROGRESSION_ALGORITHM_DETAILS.md to explain numerical precision differences causing minor area discrepancies.
- Added scripts/compare_serial_vs_parallel_adaptive.py to benchmark Serial Optimized vs Parallel Adaptive (Speed) modes. - Fixed NameError in src/losneomrade/retrogression.py by correcting the function call in _process_group. - Updated docs/PERFORMANCE_FINDINGS.md to explain area differences in Parallel Speed mode due to aggressive cropping and reflected recent code changes. - Updated docs/RETROGRESSION_ALGORITHM_DETAILS.md to explain numerical precision differences causing minor area discrepancies.
… data - Deleted `generate_parallel_figures_v2.py` which contained functions for generating parallel figures related to retrogression analysis. - Removed `plot_benchmark_data.py` which was responsible for visualizing benchmark data from DEM and stream files. - Eliminated `plot_performance_metrics.py` that plotted performance metrics from CSV files comparing original and optimized methods. - Deleted `run_and_compare_retrogression.py`, a script that executed retrogression analysis and compared results between serial and adaptive methods.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR contains significant performance improvements for the landslide retrogression algorithm:
The PR also contains some additional folders which can be deleted later before merging with the main branch. The additional folders are:
Important Note
For now, it is better to accept this pull request in a new branch until you get a full sense of the changes and their impact. Instead of merging to main, you can pull this into a new branch by running:
Then you can close this PR.