a library for building configurable, repeatable experiments
Project description
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
Ingredient
class, 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 theself.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 inself.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 includePathOutput
,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
method
can be amethod
ofclass
or of an object inclass.cfg
method-args
is a space-separated list ofkey=val
arguments to pass to method--output
specifies a directory to store @cacheable output (and to find it in)--search-path
specifies directories to look for@cacheable
output inconfig-args
is a space-separated list ofkey=val
arguments to initializeclass
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
fob-0.0.5.tar.gz
(24.8 kB
view details)
Built Distribution
fob-0.0.5-py3-none-any.whl
(19.2 kB
view details)
File details
Details for the file fob-0.0.5.tar.gz
.
File metadata
- Download URL: fob-0.0.5.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f02467dd190ac5de12e330c263379425719b1fe91e8e1bb20d9192a389a4943f |
|
MD5 | 25e497942c468d47dddae6f4ba3817ec |
|
BLAKE2b-256 | 72973bd9bffe4b5a2685f2e6d680aa8044c9e1679317ba708146ff6e328b6fae |
File details
Details for the file fob-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: fob-0.0.5-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcc5af627ec170d52440f78d8e9d918e19e7f7703f71a1ab14b23a67ed4da41e |
|
MD5 | 6c291f35c9c67b11dbaae83d02d54b82 |
|
BLAKE2b-256 | 4ab3385e1a649819e35b630140b5f0065f5cfa92aa5df9b6854baee2876dfbfe |