Skip to content
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

Expose number of jobs to organize #1341

Merged

Conversation

CodyCBakerPhD
Copy link
Contributor

@CodyCBakerPhD CodyCBakerPhD commented Oct 31, 2023

Recent usage of the DANDI API in the NWB GUIDE revealed a sporadic joblib issue that results in segmentation faults - no clue what actually causes it for some users, but the best solution we have for now is to just expose job usage directly

Where should tests for this go?

Copy link

codecov bot commented Oct 31, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e99ee62) 88.88% compared to head (579d108) 89.03%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1341      +/-   ##
==========================================
+ Coverage   88.88%   89.03%   +0.14%     
==========================================
  Files          76       76              
  Lines       10240    10243       +3     
==========================================
+ Hits         9102     9120      +18     
+ Misses       1138     1123      -15     
Flag Coverage Δ
unittests 89.03% <100.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
dandi/cli/cmd_organize.py 100.00% <100.00%> (ø)
dandi/organize.py 85.29% <100.00%> (+1.71%) ⬆️
dandi/tests/test_organize.py 95.53% <100.00%> (+0.02%) ⬆️

... and 5 files with indirect coverage changes

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

@yarikoptic
Copy link
Member

more info on segfault? I usually try to run those through valgrind to get a sense where/why might be happening although IIRC it was tricky with python stuff.

re tests - just make one of the invocations in dandi/tests/test_organize.py with jobs=1 to cover that codepath, not sure if we should sweat too much on really testing beyond smoke test on that aspect

@CodyCBakerPhD
Copy link
Contributor Author

CodyCBakerPhD commented Nov 1, 2023

more info on segfault? I usually try to run those through valgrind to get a sense where/why might be happening although IIRC it was tricky with python stuff.

Sadly no. It was just something random that occurred in certain user environments during first round of alpha testing - the local traceback led back to joblib called by DANDI organize - we've been unable to reproduce it generally - so the best workaround we can think on is to disable joblib usage in those situations

Co-authored-by: Yaroslav Halchenko <debian@onerussian.com>
dandi/organize.py Outdated Show resolved Hide resolved
dandi/organize.py Outdated Show resolved Hide resolved
dandi/organize.py Outdated Show resolved Hide resolved
dandi/organize.py Outdated Show resolved Hide resolved
@CodyCBakerPhD CodyCBakerPhD marked this pull request as ready for review November 1, 2023 18:40
@yarikoptic yarikoptic added the minor Increment the minor version when merged label Nov 1, 2023
@yarikoptic yarikoptic merged commit c567c8b into dandi:master Nov 1, 2023
23 checks passed
@CodyCBakerPhD CodyCBakerPhD deleted the expose_number_of_jobs_to_organize branch November 2, 2023 02:38
Copy link

github-actions bot commented Nov 8, 2023

🚀 PR was released in 0.58.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants