Lsf Hydra Launcher plugin
Project description
hydra-lsf-launcher
This is a simple launcher for launching Hydra jobs on LSF clusters. It is a simple wrapper around the bsub
command that allows you to launch Hydra jobs with a single command.
WARNING: expect bugs and run at your own risk. This is not an official Hydra project.
Installation
Install the package with pip:
pip install hydra-lsf-launcher
Usage
Here is an example using hydra-zen
to launch a job on an LSF cluster:
from hydra_zen import store, zen
import time
def main_func(sentence):
time.sleep(120)
print(sentence)
store(
main_func,
hydra_defaults=[
"_self_",
]
)
if __name__ == "__main__":
store.add_to_hydra_store()
zen(main_func).hydra_main(
config_name="main_func", version_base="1.1", config_path=None
)
Then you can run it with:
python myscript.py hydra/launcher=lsf sentence="Hello World!" -m
Job groups
To limit the number of concurrent jobs, as for now job arrays are not supported, the user can set job groups:
bgadd /myJobGroup
bgmod -L 4 /myJobGroup # limit to 4 concurrent jobs
Then you can run it with:
python myscript.py hydra/launcher=lsf hydra.launcher.bsub_args="-g /myJobGroup" sentence="Hello World!" -m
Some useful commands. To change the limit of a job group:
bgmod -L <new_limit> /myJobGroup
To delete a job group:
bgdel /myJobGroup
More complex examples
Run 5 jobs (4 parallel), each with 2GB of memory, and 4 cores from 2 different nodes.
python myscript.py hydra/launcher=lsf hydra.launcher.verbose=False hydra.launcher.n=4 'hydra.launcher.bsub_args= -g /myJobGroup -R span\[ptile\=2\]' hydra.launcher.M="2GB" sentence="Hello World!,Hello World!,Hello World!,Hello World!,Hello World!" -m
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hydra_lsf_launcher-0.1.2.tar.gz
.
File metadata
- Download URL: hydra_lsf_launcher-0.1.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98191670be92da729c1bb7a79abfc97b275b903e5752f03e6bc0bc9fd3b02a1e |
|
MD5 | 960147d6aceba89d3717b62ea68133fa |
|
BLAKE2b-256 | 277570cf18c57574661faed6d35d464bf348eab10bdb2b9e3e6053009758073b |
File details
Details for the file hydra_lsf_launcher-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: hydra_lsf_launcher-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31690ac53a28db65618e9969cd45685920daf19f1fe4847b232170f622450b43 |
|
MD5 | d36d9d84462f0c6abbe00b72887029f6 |
|
BLAKE2b-256 | b8ed9d822f6d6a47c374be2765cd50e8b5c6518c74b91c6ee39643055fab7bfa |