Skip to main content

A simple JIT job management framework in Python.

Project description

Custodian logo GitHub license Linting Testing Downloads codecov

Custodian is a simple, robust and flexible just-in-time (JIT) job management framework written in Python. Using custodian, you can create wrappers that perform error checking, job management and error recovery. It has a simple plugin framework that allows you to develop specific job management workflows for different applications.

Error recovery is an important aspect of many high-throughput projects that generate data on a large scale. When you are running on the order of hundreds of thousands of jobs, even an error-rate of 1% would mean thousands of errored jobs that would be impossible to deal with on a case-by-case basis.

The specific use case for custodian is for long running jobs, with potentially random errors. For example, there may be a script that takes several days to run on a server, with a 1% chance of some IO error causing the job to fail. Using custodian, one can develop a mechanism to gracefully recover from the error, and restart the job with modified parameters if necessary.

The current version of Custodian also comes with several sub-packages for error handling for Vienna Ab Initio Simulation Package (VASP), NwChem, QChem, FEFF, Lobster and CP2K calculations.

Getting custodian

Stable version

The version at the Python Package Index (PyPI) is always the latest stable release that will be hopefully, be relatively bug-free. Install as follows:

pip install custodian

Some plugins (e.g., VASP management) require additional setup (please see pymatgen docs).

Developmental version

The bleeding edge developmental version is at the custodian's Github repo. The developmental version is likely to be more buggy, but may contain new features. The Github version include test files as well for complete unit testing. After cloning the source, you can type

pip install -e .

to install the package in editable mode.

Requirements

Custodian has no required dependencies. However, if you wish to use many of the built-in error handlers and Jobs for VASP, NWChem, QChem, etc., you will likely need pymatgen to be installed as well.

Usage

Please refer to the official custodian docs for details on how to use custodian.

How to cite custodian

If you use custodian in your research, especially the VASP component, please consider citing the following work:

Shyue Ping Ong, William Davidson Richards, Anubhav Jain, Geoffroy Hautier,
Michael Kocher, Shreyas Cholia, Dan Gunter, Vincent Chevrier, Kristin A.
Persson, Gerbrand Ceder. *Python Materials Genomics (pymatgen) : A Robust,
Open-Source Python Library for Materials Analysis.* Computational
Materials Science, 2013, 68, 314-319. doi:10.1016/j.commatsci.2012.10.028

License

Custodian is released under the MIT License. The terms of the license are as follows:

The MIT License (MIT)
Copyright (c) 2011-2012 MIT & LBNL

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

custodian-2025.8.13.tar.gz (111.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

custodian-2025.8.13-py3-none-any.whl (123.9 kB view details)

Uploaded Python 3

File details

Details for the file custodian-2025.8.13.tar.gz.

File metadata

  • Download URL: custodian-2025.8.13.tar.gz
  • Upload date:
  • Size: 111.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for custodian-2025.8.13.tar.gz
Algorithm Hash digest
SHA256 9289787558dc2785905d88aecba557ffab913e4006dbf8b63717e716eb33351d
MD5 2ac8d3002f9f3d32936b9dd02e06340e
BLAKE2b-256 3dcf0f80e69fd38f7536b67d695d41938839edaa7d34d62efd03b441c1d287f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for custodian-2025.8.13.tar.gz:

Publisher: release.yml on materialsproject/custodian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custodian-2025.8.13-py3-none-any.whl.

File metadata

  • Download URL: custodian-2025.8.13-py3-none-any.whl
  • Upload date:
  • Size: 123.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for custodian-2025.8.13-py3-none-any.whl
Algorithm Hash digest
SHA256 33ec8ffe3391ccceadfac3efd883629030d21515d087e03b9a1084249ca6c766
MD5 86a8514ea68bc81950dd0d7291dd2c25
BLAKE2b-256 f389b63668c28b02fd7049143ed184fe77fa051ec0cc924fb833a79361aec1b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for custodian-2025.8.13-py3-none-any.whl:

Publisher: release.yml on materialsproject/custodian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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