
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
ipython-cluster-helper
Advanced tools
.. image:: https://travis-ci.org/roryk/ipython-cluster-helper.svg :target: https://travis-ci.org/roryk/ipython-cluster-helper .. image:: https://zenodo.org/badge/3658/roryk/ipython-cluster-helper.svg :target: https://zenodo.org/record/17119#.VT7oWs5dqyM
Quickly and easily parallelize Python functions using IPython on a cluster, supporting multiple schedulers. Optimizes IPython defaults to handle larger clusters and simultaneous processes.
Lets say you wrote a program that takes several files in as arguments and performs some kind of long running computation on them. Your original implementation used a loop but it was way too slow
.. code-block:: python
from yourmodule import long_running_function
import sys
if __name__ == "__main__":
for f in sys.argv[1:]:
long_running_function(f)
If you have access to one of the supported schedulers you can easily parallelize your program across 5 nodes with ipython-cluster-helper
.. code-block:: python
from cluster_helper.cluster import cluster_view
from yourmodule import long_running_function
import sys
if __name__ == "__main__":
with cluster_view(scheduler="lsf", queue="hsph", num_jobs=5) as view:
view.map(long_running_function, sys.argv[1:])
That's it! No setup required.
To run a local cluster for testing purposes pass run_local
as an extra
parameter to the cluster_view function
.. code-block:: python
with cluster_view(scheduler=None, queue=None, num_jobs=5,
extra_params={"run_local": True}) as view:
view.map(long_running_function, sys.argv[1:])
ipython-cluster-helper creates a throwaway parallel IPython profile, launches a cluster and returns a view. On program exit it shuts the cluster down and deletes the throwaway profile.
Platform LSF ("lsf"), Sun Grid Engine ("sge"), Torque ("torque"), SLURM ("slurm").
The cool parts of this were ripped from bcbio-nextgen
_.
.. _bcbio-nextgen: https://github.com/chapmanb/bcbio-nextgen
FAQs
Simplify IPython cluster start up and use for multiple schedulers.
We found that ipython-cluster-helper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.