Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

achieveordie
Copy link
Contributor

Closes #461

  • There are some minor internal API changes to facilitate this but nothing on the user-facing end.
  • The tests are taken from the single-processing version and expanded to use multiprocessing. I hope that is okay.
  • Also, renamed a test method inside test_trajectory_splitter.py to follow proper naming convention.

Let me know what you think about it, @anitagraser

@codecov-commenter
Copy link

codecov-commenter commented Apr 27, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.48%. Comparing base (3f462dc) to head (12bb786).
Report is 21 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #463      +/-   ##
==========================================
+ Coverage   96.35%   96.48%   +0.12%     
==========================================
  Files          35       35              
  Lines        4257     4381     +124     
==========================================
+ Hits         4102     4227     +125     
+ Misses        155      154       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@anitagraser anitagraser merged commit bd2a167 into movingpandas:main Apr 27, 2025
9 checks passed
@anitagraser
Copy link
Collaborator

Thank you for you contributions, Sagar. Much appreciated.

@anitagraser
Copy link
Collaborator

For future reference, here are some performance comparisons

Mode min_length Early Skipping n_processes 0.01 million points (s) 0.1 million points (s) 0.5 million points (s)
Value Change Splitter 1000 No 1 2.632380 24.794708 132.504514
Value Change Splitter 1000 No 16 5.792837 18.799301 77.033445
Value Change Splitter 1000 Yes 1 2.021787 17.722349 97.096850
Value Change Splitter 1000 Yes 16 5.602232 17.298913 69.297309
Value Change Splitter No No 1 1.989890 21.177990 89.591676
Value Change Splitter No No 16 5.037065 7.698795 21.954373

(Early skipping was introduced in #458)

image



### Lazy init + Value Change Splitter (n_processes=1)

#### Without min_length

--- 0.01 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  1.989890s

--- 0.1 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  21.177990s

--- 0.5 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  89.591676s

#### with min_length 1000 

--- 0.01 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  2.632380s

--- 0.1 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  24.794708s

--- 0.5 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  132.504514s

#### with min_length 1000  and early skipping

--- 0.01 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  2.021787s

--- 0.1 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  17.722349s

--- 0.5 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  97.096850s




### Lazy init + Value Change Splitter (n_processes=16)


#### Without min_length

--- 0.01 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  5.037065s

--- 0.1 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  7.698795s

--- 0.5 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  21.954373s

#### with min_length 1000 


--- 0.01 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  5.792837s

--- 0.1 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  18.799301s

--- 0.5 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  77.033445s


#### with min_length 1000 and early skipping

--- 0.01 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  5.602232s

--- 0.1 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  17.298913s

--- 0.5 million points ---
TrajectoryCollection with 16 trajectories
Trajectory init + ValueChangeSplitter:  69.297309s


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.

Add parallel processing to TrajectorySplitters
3 participants