Skip to main content

a library for building configurable, repeatable experiments

Project description

License: MIT Worfklow PyPI version fury.io Code style: black

fob

fob is a library for building configurable, repeatable experiments. It comes with a fob command for running and inspecting experiment pipelines, which are built from configurable ingredients.

Ingredient

An ingredient is the basic building block of a pipeline. Ingredients are configured using their __init__method, which allows unified Python and CLI APIs. They need to:

  • Subclass the Ingredientclass, which allows the ingredient to be recognized (and provides many convenience methods)
  • Decorate their __init__ function with @configurable, which makes the arguments passed to __init__ accessible from the self.cfg dict. This allows the arguments to be configured from the CLI and tracked for artifact provenance
  • Decorate select methods with @cacheable, which saves the method's output based on (1) the method's arguments and (2) the configuration in self.cfg. When possible, decorated methods load output from disk rather than recomputing it. The @cacheable decorator takes an output type as an argument, such as @cacheable(NumpyOutput). Other valid types include PathOutput, PickleOutput, StringOutput, etc.

Command

The fob command can run arbitrary methods within a pipeline. It uses the syntax:

fob <class> [method] [method-args] [--output DIR] [--search-path DIR] [--config config-args]

where

  • methodcan be a method of class or of an object in class.cfg
  • method-args is a space-separated list of key=valarguments to pass to method
  • --outputspecifies a directory to store @cacheable output (and to find it in)
  • --search-path specifies directories to look for @cacheable output in
  • config-args is a space-separated list of key=valarguments to initialize class

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

fob-0.0.4.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

fob-0.0.4-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file fob-0.0.4.tar.gz.

File metadata

  • Download URL: fob-0.0.4.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.6

File hashes

Hashes for fob-0.0.4.tar.gz
Algorithm Hash digest
SHA256 c119711f76764cde0fa65befe531c984fc6ede303bb5a7e5b862e1d1415556f1
MD5 c57d9879fc31598d008c1bdcb966e4e0
BLAKE2b-256 b432852bdf5bbc1dad04bf378d1570fd3238ad21857e36c3658ee2b0e4015aac

See more details on using hashes here.

File details

Details for the file fob-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: fob-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.6

File hashes

Hashes for fob-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 394b29544b265bdcd8c4ca7ca9bb83471a67c7f2cc0d1a1ac2fbb5907fe240f0
MD5 bfc9c631c842915bd84a5776912881b0
BLAKE2b-256 27cf77dc4bda3148f1fe3558f4de10f71d40e64031fabdef8a764387a5e868b0

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