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

Control DANDI Jobs and Threads #490

Merged
merged 19 commits into from
Nov 2, 2023
Merged

Control DANDI Jobs and Threads #490

merged 19 commits into from
Nov 2, 2023

Conversation

garrettmflynn
Copy link
Member

This PR allows users to control the number of jobs and threads when uploading to DANDI on the GUIDE.

May fix the segmentation fault issue we discovered during alpha tests.

@garrettmflynn garrettmflynn self-assigned this Oct 31, 2023
@CodyCBakerPhD
Copy link
Collaborator

@garrettmflynn Is there a way to constrain the values of the IntRangeSlider to not include zero? Also to include in the description something about how -1 syntax uses all available processes, etc...

@garrettmflynn
Copy link
Member Author

garrettmflynn commented Nov 1, 2023

Not yet—but I will make a way. Users can also free-input any flat value, so I'll implement a way to automatically round those too.

@CodyCBakerPhD
Copy link
Collaborator

@garrettmflynn Yeah, that too - for setting maximum caps here is the Python snippet if you want to add a simple endpoint to grab that value from the system reliably

from psutil import cpu_count

max_number_of_jobs = cpu_count(logical=False)

@garrettmflynn
Copy link
Member Author

Working on this now. Is there a similar way to bound threads?

@garrettmflynn
Copy link
Member Author

Just pushed the proper workflow for jobs. Threads currently have no maximum

@CodyCBakerPhD
Copy link
Collaborator

CodyCBakerPhD commented Nov 2, 2023

Is there a similar way to bound threads?

Yessir,

number_of_threads = cpu_count(logical=True) / cpu_count(logical=False)

(which is really threads per job, not the grand total - but that's what DANDI would want specified anyhow)

@garrettmflynn
Copy link
Member Author

Sweet updated. Should be ready for review now

@CodyCBakerPhD
Copy link
Collaborator

One minor update to a description and otherwise LGTM

Co-authored-by: Cody Baker <[email protected]>
@garrettmflynn
Copy link
Member Author

Awesome. Glad we're getting this in

@CodyCBakerPhD
Copy link
Collaborator

@garrettmflynn One question on the effect of the new chromatic stories

@garrettmflynn
Copy link
Member Author

Working locally now on Storybook

@CodyCBakerPhD CodyCBakerPhD merged commit 90655f8 into main Nov 2, 2023
7 checks passed
@CodyCBakerPhD CodyCBakerPhD deleted the control-jobs branch November 2, 2023 22:41
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