Skip to main content
          pysge      +     +
    /\         /\     \   O \
   / \\  /\   /\\\     \_/|\_\
  /   \\/ \\ /  \\\       \\
       /   \/    \\\     \/'
      /    /      \\\     \\_
     /    /        \\\     -

Call python functions on (IC) SGE batch cluster - with tqdm progress bars. Designed to work inside a jupyter notebook.

How to use

Docs.

High-level interface use:

import pysge

def myfunc(a, b):
    return a + b

tasks = [
    {"task": myfunc, "args": (1, 2), "kwargs": {}},
    {"task": myfunc, "args": (3, 4), "kwargs": {}},
    {"task": myfunc, "args": (5, 6), "kwargs": {}},
]

results = pysge.local_submit(tasks) # single process for loop over tasks - tasks stored in memory
results = pysge.mp_submit(tasks, ncores=3) # multiple processes with a queue for the tasks - tasks stored in memory
results = pysge.sge_submit(tasks, "name", "/tmp/pysge-temporaries", options="-q hep.q") # SGE batch pool queue for the tasks - tasks stored on disk
# WIP: results = pysge.condor_submit(tasks, "name", "/tmp/pysge-temporaries") # Condor batch pool queue for the tasks - tasks stored on disk
print(results) # [3, 7, 11]

The return value is a list of results for each task, in order of tasks.

How it works

For SGE batch system a working area is created and the functions + args + kwargs are dilled. A submitter then submits each dilled file to the batch using subprocess. A monitor checks the status of these jobs, waits until all are finished and returns the results.

For multiprocessing no working area is needed and the submitter uses multiprocessing.

For local no submitter is needed. It just loops over the tasks.

Metadata

Release files for pysge 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysge 0.2.5
File Size Uploaded Provenance
pysge-0.2.5.tar.gz 8.7 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for pysge 0.2.5
File Interpreter ABI Platform
pysge-0.2.5-py3-none-any.whl Python 3 none any Details
pysge-0.2.5-py2-none-any.whl Python 2 none any Details

Total release size: 30.3 kB

Release files / pysge-0.2.5.tar.gz

Download URL pysge-0.2.5.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4f34384125cf6ae6bfcadf125996b3464bbea1e9ef81e81e7b39d26d585c2f47
BLAKE2b-256 checksum
How to use checksums
12e3528474ff6fc64cc9f0bcdccf5427885dc2c374382304569096422fa61f6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1

Release files / pysge-0.2.5-py3-none-any.whl

Download URL pysge-0.2.5-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61bcf016b81ed15921fbe492ac85d2634603aad7c1a00c43f85011273f8044b1
BLAKE2b-256 checksum
How to use checksums
480dae1ce275636b216ebbea52c1e114a34922cbc87356dd7e2a63f6287b18b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1

Release files / pysge-0.2.5-py2-none-any.whl

Download URL pysge-0.2.5-py2-none-any.whl
Size 10.8 kB
Tags Python 2
SHA-256 checksum
How to use checksums
adee55692f2bc1080c2d812218a8a180ff38db7b84eedb0887e7631ad5134950
BLAKE2b-256 checksum
How to use checksums
2eb4cdc7224ba31f1ebed7042da6f5ba922b42b13d4243b2de30a72883d25927
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/2.7.17

Security for pysge 0.2.5

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page