-
Notifications
You must be signed in to change notification settings - Fork 7
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
Slurm script update #265
Merged
Merged
Slurm script update #265
Conversation
This file contains 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
matbun
reviewed
Dec 12, 2024
matbun
reviewed
Dec 16, 2024
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.
It looks good to me! I know you and Matteo talked about this a lot, and he probably has more valuable feedback to give on slurm, but it looks very well written to me! Also as a non-slurm expert I was able to understand it, so nice :)
matbun
approved these changes
Dec 16, 2024
annaelisalappe
pushed a commit
that referenced
this pull request
Jan 8, 2025
* add slurm template script * add eurac slurm script for testing * fix some linting errors * add contributors * make script class based * add code for running script * fix more linting errors * move slurm scripts into src and add use-case specific script * rename slurmscript class * add argparser * create runall methods * fix import order * add builder for tutorial * make parser more general * add logic for disabling running script * add function for generating identifier * fix linting errors * make runall work for eurac * fix merge conflicts * some code clean up * small adjustments to make it work for the EURAC case * add implementation for virgo use case * add slurm_scripts/ to gitignore * add ability to override training command in config file * update std_out and err_out automatically * add auto std_out for real this time * make slurm script for scaling test * fix linting errors * add separate file for generic slurm script maker and small changes * fix linting errors
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 implements the SLURM scripts in Python instead of bash, for more simplicity in the long run.
The current implementation allows you to use configuration files to run SLURM jobs, bypassing the need for one (or multiple) bash script(s) to do the same. If you need more fine-grained control, you can also inherit from the
SlurmScriptBuilder
class and write your own logic. This makes it very easy to do things such as running all the strategies or doing scalings tests.Below, you can see an example of using the built in builder. Assuming you have a configuration file called
slurm_config.yaml
, you can pass it with-c
and then add/override any arguments you want after.In this case, we do
--no-submit-job
and--no-retain-file
, meaning that it will not run the script with sbatch and it will also not save it to file. When both of these are active, the builder will simply print the script to the console. This allows for a quick feedback loop when creating your config, as you can make changes, look at the definitive output without having to wonder what the variables are evaluated to, and repeat until you get exactly the script you want. Afterwards, you can then remove--no-submit-job
to make sure it is being executed and if you want to store the same script for later (e.g. for reproducibility) then you can also remove--no-retain-file
to make it automatically save to file.Future Plans
This PR contains the initial design for the SLURM job creator. There are more features that we wish to add, but these might be more suitable for another PR, as I currently have something else that is being blocked by this. Besides, getting your input after testing this out is also valuable. Some features for a future PR are:
Related issue :
#263