Skip to main content

This is as very simple hackish hack, that allows you to any serializable python callable as a torque job.

Features:

  • Allows you to send enviorment on the other side

  • Allows to execute any callable function as a torque task

  • Allows you to launch a bunch of taska as a torque array job.

Dependencies:

  • Working python 2.7/3.4 enviorment

  • Some python dependencies (see REQUIREMENTS)

  • Working qsub command (no need for other PBS/torque stuff).

Works by serializing the enviorment and callable function to the enviorment variables (or enviorment variables and files). For serialization we use dill if avilable or pickle.

Enviorment can be initialized using arbirtary bash script — this script will be sourced before running provided python callable.

Example

Example without enviorment:

 callable = partial(print, "Hello World!")

from torqsubmit import Submitter

s = Submitter()
s.tasks = [callable]
s.submit()

Example with enviorment:

callable = partial(print, "Hello World!")

from torqsubmit._submit import Submitter

ENV = """
source ${HOME}/.bashrc
workon torque-submit
export MSG="Hello World!"
"""

def print_from_env():
    import os
    print(os.environ["MSG"])

s = Submitter()
s.tasks = [callable]
s.enviorment = ENV
s.submit()

Example submitting many tasks:

from __future__ import print_function
from functools import partial

callable = partial(print, "Hello World!")

from torqsubmit._submit import Submitter


ENV = """
source ${HOME}/.bashrc
workon torque-submit
export MSG="Hello World!"
"""


def print_from_env():
    import os
    print(os.environ["MSG"])


s = Submitter()
s.enviorment = ENV
s.tasks = [print_from_env, print_from_env]
s.submit()

Metadata

Release files for torque-submit 0.0.3

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

Source distribution (sdist)

Source distribution for torque-submit 0.0.3
File Size Uploaded Provenance
torque-submit-0.0.3.tar.gz 5.7 kB Without provenance Details

Release files / torque-submit-0.0.3.tar.gz

Download URL torque-submit-0.0.3.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
eb5566094e8955d0f45d26c1e53edda6c8a43a6f2eaba6526be7a24cc29e75e4
BLAKE2b-256 checksum
How to use checksums
0c343339b0ac7abd7f5eac8f811cae251f1fd8455c0707ee0f5e827f5ba5065d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for torque-submit 0.0.3

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.

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file No provenance

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