zookeeper
A small library for managing deep learning models, hyperparameters and datasets
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.5%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
A small library for managing deep learning models, hyperparameters and datasets
Basic Info
Statistics
- Stars: 24
- Watchers: 10
- Forks: 10
- Open Issues: 14
- Releases: 43
Topics
Metadata Files
README.md
Zookeeper
A small library for configuring modular applications.
Installation
console
pip install zookeeper
Components
The fundamental building blocks of Zookeeper are components. The
@component decorator is used to turn classes into
components. These component classes can have configurable fields, which are
declared with the Field constructor and class-level type annotations. Fields
can be created with or without default values. Components can also be nested,
with ComponentFields, such that child componenents can access the field values
defined on their parents.
For example:
```python from zookeeper import component
@component
class ChildComponent:
a: int = Field() # An int field with no default set
b: str = Field("foo") # A str field with default value "foo"
@component
class ParentComponent:
a: int = Field() # The same int field as the child
child: ChildComponent = ComponentField() # A nested component field, of type ChildComponent
```
After instantiation, components can be 'configured' with a configuration dictionary, containing values for a tree of nested fields. This process automatically injects the correct values into each field.
If a child sub-component declares a field which already exists in some containing ancestor component, then it will pick up the value that's set on the parent, unless a 'scoped' value is set on the child.
For example:
``` from zookeeper import configure
p = ParentComponent()
configure( p, { "a": 5, "child.a": 4, } )
'ChildComponent' is the only concrete component class that satisfies the type of the annotated parameter 'ParentComponent.child'. Using an instance of this class by default.
print(p)
ParentComponent( a = 5, child = ChildComponent( a = 4, b = "foo" ) ) ```
Tasks and the CLI
The @task decorator is used to define Zookeeper tasks and
can be applied to any class that implements an argument-less run method. Such
tasks can be run through the Zookeeper CLI, with parameter values passed in
through CLI arguments (configure is implicitly called).
For example:
```python from zookeeper import cli, task
@task class UseChildA: parent: ParentComponent = ComponentField() def run(self): print(self.parent.child.a)
@task class UseParentA(UseChildA): def run(self): print(self.parent.a)
if name == "main": cli() ```
Running the above file then gives a nice CLI interface:
``` python test.py usechilda
ValueError: No configuration value found for annotated parameter 'UseChildA.parent.a' of type 'int'.
python test.py usechilda a=5
5
python test.py usechilda a=5 child.a=3
3
python test.py useparenta a=5 child.a=3
5 ```
Using Zookeeper to define Larq or Keras experiments
See examples/larq_experiment.py for an example of how to use Zookeeper to define all the necessary components (dataset, preprocessing, and model) of a Larq experiment: training a BinaryNet on MNIST. This example can be easily adapted to other Larq or Keras models and other datasets.
Owner
- Name: larq
- Login: larq
- Kind: organization
- Location: London - Amsterdam
- Website: https://larq.dev
- Repositories: 7
- Profile: https://github.com/larq
An Open-Source Deep Learning Library for Training Binarized Neural Networks
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| dependabot[bot] | 4****] | 124 |
| Lukas Geiger | l****4@g****m | 101 |
| Adam Hillier | 7****r | 81 |
| Jelmer Neeven | 1****n | 11 |
| dependabot-preview[bot] | 2****] | 6 |
| Cedric Nugteren | w****b@c****l | 6 |
| James | j****6@g****m | 4 |
| Tim de Bruin | t****m@p****m | 2 |
| Koen Helwegen | k****n@p****m | 2 |
| nschaffner | 4****r | 1 |
| koenhelwegen | k****n@g****m | 1 |
| koenhelwegen | k****n@p****k | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 5
- Total pull requests: 116
- Average time to close issues: 4 months
- Average time to close pull requests: 15 days
- Total issue authors: 3
- Total pull request authors: 5
- Average comments per issue: 1.6
- Average comments per pull request: 0.49
- Merged pull requests: 72
- Bot issues: 0
- Bot pull requests: 102
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jneeven (3)
- AdamHillier (1)
- CNugteren (1)
Pull Request Authors
- dependabot[bot] (100)
- CNugteren (5)
- AdamHillier (4)
- lgeiger (3)
- jneeven (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 1,256 last-month
- Total docker downloads: 1,542,179
- Total dependent packages: 1
- Total dependent repositories: 13
- Total versions: 43
- Total maintainers: 1
pypi.org: zookeeper
A small library for managing deep learning models, hyper-parameters and datasets
- Homepage: https://github.com/larq/zookeeper
- Documentation: https://zookeeper.readthedocs.io/
- License: Apache 2.0
-
Latest release: 1.3.4
published over 2 years ago
Rankings
Maintainers (1)
Dependencies
- click >=7.0,<8.2.0
- importlib-metadata *
- tensorflow-datasets >=1.3.0,<4.7.0
- typeguard >=2.5.1,<2.14.0
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- pypa/gh-action-pypi-publish master composite
- toolmantim/release-drafter v5.21.1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite