-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
LSF: Add unit scaling other than MB #274
Conversation
The `lsf.conf` file can specify units other than MB for memory, and any other large units of scaling, through the `LSF_UNIT_FOR_LIMITS` variable. Dask Jobqueue assumes that the units are MB, which is true under the default setup of LSF, but not always. * If the admin has changed it to something else in the file. * If the file does not exist, LSF assumes KB. This PR adds the ability for users to both specify or allow auto detection of the unit system through an `lsf_units` kwarg or `lsf-units` YAML arg. Auto-detection routine is based on the LSF 9.1.3 docs for where to look, defaults, and variable names.
For reference, here are the official LSF docs on the mater |
I think I fixed all the bugs now, I'm not sure where I introduced |
Thanks @Lnaden for this, I did not have the time to take a look at it tight now, but I'll try as soon as possible. In the mean time if any other maintainer or experimented user can look at this, this could be nice! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay thanks for the work here !
This looks really good, the only thing that is missing is actual tests. Could you provide a test with some given unit, and a test for lsf_detect_units
, which is the most complicated part?
You've got a trailing white space on line 35 of lsf.py, in the docstring. Also did you apply black on your codes? |
I'll work on a test and black today. There are also some changes in the 10.1+ version of LSF, so I'm going to make changes to work in both |
Add test for the auto-unit detection Black ran Changed detection to include LSF 10.1+ versions as well
I made some changes to include the LSF 10.1+ way of doing things, you can apparently specify everything from KB up to ZB, and even then in single letter short-hand. I think there may be an issue with the For reference, here is the 10.1 docs: I made the following changes as well as requested:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! looks good!
The
lsf.conf
file can specify units other than MB for memory, andany other large units of scaling, through the
LSF_UNIT_FOR_LIMITS
variable.
Dask Jobqueue assumes that the units are MB, which is true under
the default setup of LSF, but not always.
This PR adds the ability for users to both specify or allow auto
detection of the unit system through an
lsf_units
kwarg orlsf-units
YAML arg.
Auto-detection routine is based on the LSF 9.1.3 docs for where to
look, defaults, and variable names.