zookeeper

A small library for managing deep learning models, hyperparameters and datasets

https://github.com/larq/zookeeper

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

command-line-interface deep-learning hyperparameter keras machine-learning python tensorflow tensorflow-datasets

Keywords from Contributors

binarized-neural-networks binder larq quantized-neural-networks distributed deep-neural-networks interactive serializer notebook caffe
Last synced: 6 months ago · JSON representation

Repository

A small library for managing deep learning models, hyperparameters and datasets

Basic Info
  • Host: GitHub
  • Owner: larq
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 4.18 MB
Statistics
  • Stars: 24
  • Watchers: 10
  • Forks: 10
  • Open Issues: 14
  • Releases: 43
Topics
command-line-interface deep-learning hyperparameter keras machine-learning python tensorflow tensorflow-datasets
Created almost 7 years ago · Last pushed about 2 years ago
Metadata Files
Readme Contributing License Code of conduct

README.md

Zookeeper

GitHub Actions Codecov PyPI - Python Version PyPI PyPI - License Code style: black

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

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

All Time
  • Total Commits: 340
  • Total Committers: 12
  • Avg Commits per committer: 28.333
  • Development Distribution Score (DDS): 0.635
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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
feature (2)
Pull Request Labels
dependencies (103) python (79) github_actions (22) skip-changelog (4) internal-improvement (2) breaking-change (2) bug (1)

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

  • Versions: 43
  • Dependent Packages: 1
  • Dependent Repositories: 13
  • Downloads: 1,256 Last month
  • Docker Downloads: 1,542,179
Rankings
Docker downloads count: 0.8%
Dependent repos count: 4.0%
Dependent packages count: 4.7%
Average: 6.7%
Downloads: 7.0%
Forks count: 10.9%
Stargazers count: 12.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • click >=7.0,<8.2.0
  • importlib-metadata *
  • tensorflow-datasets >=1.3.0,<4.7.0
  • typeguard >=2.5.1,<2.14.0
.github/workflows/lint.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pypa/gh-action-pypi-publish master composite
.github/workflows/release-notes.yml actions
  • toolmantim/release-drafter v5.21.1 composite
.github/workflows/unittest.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite