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
Metadata
Release files for hydra-lsf-launcher 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| hydra_lsf_launcher-0.1.2.tar.gz | 4.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hydra_lsf_launcher-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.4 kB
Release files / hydra_lsf_launcher-0.1.2.tar.gz
| Download URL | hydra_lsf_launcher-0.1.2.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98191670be92da729c1bb7a79abfc97b275b903e5752f03e6bc0bc9fd3b02a1e
|
|
BLAKE2b-256 checksum How to use checksums |
277570cf18c57574661faed6d35d464bf348eab10bdb2b9e3e6053009758073b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Release files / hydra_lsf_launcher-0.1.2-py3-none-any.whl
| Download URL | hydra_lsf_launcher-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31690ac53a28db65618e9969cd45685920daf19f1fe4847b232170f622450b43
|
|
BLAKE2b-256 checksum How to use checksums |
b8ed9d822f6d6a47c374be2765cd50e8b5c6518c74b91c6ee39643055fab7bfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Security for hydra-lsf-launcher 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.