Skip to main content

OAR plugin for Submitit

Project description

What is submitit_oar?

submitit_oar is an Oar plugin for Submitit, which is a Python 3.8+ lightweight toolbox for submitting Python functions for computation within a Slurm cluster. It basically wraps submission and provide access to results, logs and more.

How to install submitit_oar?

Quick install, in a virtualenv/conda environment where pip is installed (check which pip):

  • latest release:
pip install submitit_oar==1.1.0
  • from source:
pip install git+https://github.com/ychiat35/submitit_oar@main#egg=submitit_oar

How to use the submitit_oar plugin?

From inside an environment with submitit and submitit_oar installed, you can run this addition example:

import submitit

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

# logs are dumped in the folder
executor = submitit.AutoExecutor(folder="log_test", cluster="oar")

job_addition = executor.submit(add, 5, 7)  # will compute add(5, 7)
output = job_addition.result()  # waits for completion and returns output
# if ever the job failed, result() will raise an error with the corresponding trace
print('job_addition output: ', output)
assert output == 12

You can try running this above example with a breakpoint at https://github.com/facebookincubator/submitit/blob/main/submitit/core/plugins.py#L33, to be sure that Submitit correctly finds the submitit_oar plugin.

Releasing submitit_oar

Create a tag matching the version to release in gitlab, it should create a pipeline which will push the package to PyPi. If you want to do this manually, populate the FLIT_PASSWORD environment variable with the API token, and run make release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

submitit_oar-1.1.1.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

submitit_oar-1.1.1-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file submitit_oar-1.1.1.tar.gz.

File metadata

  • Download URL: submitit_oar-1.1.1.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for submitit_oar-1.1.1.tar.gz
Algorithm Hash digest
SHA256 480194e583b94329e5c184a3e7e0e5c19343562b58b23c0bf991f0679ca5847e
MD5 7b31074e9a43fca31afcc585a34eb25f
BLAKE2b-256 9235ccfcd732aa2153f3aa207a0a7e3386a3bb631d0547192413e4f301bddf7f

See more details on using hashes here.

File details

Details for the file submitit_oar-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for submitit_oar-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a11d89c423ce6d7acf3c04bea46c1e6a739900db7cc56c8464024b2f34234ff4
MD5 77a9e91b3520dbcd4d10b2e82cc89bec
BLAKE2b-256 8a849a324fae651261978c983a50bbf47eac945d3b127f1ae1edcc6d9c4ad40e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page