All Projects → fidelity → spock

fidelity / spock

Licence: Apache-2.0 license
spock is a framework that helps manage complex parameter configurations during research and development of Python applications

Programming Languages

python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to spock

hier config
Hierarchical Configuration
Stars: ✭ 86 (+32.31%)
Mutual labels:  configuration-management
zbx2git
Zabbix Configuration Versioning Manager
Stars: ✭ 23 (-64.62%)
Mutual labels:  configuration-management
stavka
Stavka manages configuration from various sources, for your Clojure application.
Stars: ✭ 40 (-38.46%)
Mutual labels:  configuration-management
dynamic-config
A dynamic config library for Node.js implemented in TypeScript
Stars: ✭ 29 (-55.38%)
Mutual labels:  configuration-management
i3configger
i3 config manipulation tool
Stars: ✭ 23 (-64.62%)
Mutual labels:  configuration-management
ctrip-apollo-client
This is a client library for Apollo(A reliable configuration management system) written in Node.js.
Stars: ✭ 49 (-24.62%)
Mutual labels:  configuration-management
configi.old
Bloat-free configuration management
Stars: ✭ 35 (-46.15%)
Mutual labels:  configuration-management
gitlab-configuration-as-code
Manage GitLab configuration as code to make GitLab easily managable, traceable and reproducible.
Stars: ✭ 31 (-52.31%)
Mutual labels:  configuration-management
CoSky
High-performance, low-cost microservice governance platform. Service Discovery and Configuration Service | 高性能、低成本微服务治理平台
Stars: ✭ 57 (-12.31%)
Mutual labels:  configuration-management
puppet-jboss
Installs JBoss EAP and WildFly application servers and manage their resources and applications in either a domain or a stand-alone mode
Stars: ✭ 15 (-76.92%)
Mutual labels:  configuration-management
climatecontrol
Python library for loading settings and config data from files and environment variables
Stars: ✭ 20 (-69.23%)
Mutual labels:  configuration-management
Pokedex
Pokedex is a robust Discord bot that mimics the iconic Pokedex from the Pokemon games and show. It's loaded with features to help players of all skill levels to learn and better enjoy Pokemon! The goal of Pokedex is to provide users with as much data about the Pokemon games as they desire conveniently and with minimal effort.
Stars: ✭ 18 (-72.31%)
Mutual labels:  configuration-management
envkey-node
EnvKey's official Node.js client library
Stars: ✭ 46 (-29.23%)
Mutual labels:  configuration-management
trimmer
An editor, build and player configuration framework for the Unity game engine.
Stars: ✭ 56 (-13.85%)
Mutual labels:  configuration-management
BepInEx.ConfigurationManager
Plugin configuration manager for BepInEx
Stars: ✭ 115 (+76.92%)
Mutual labels:  configuration-management
irsync
rsync on interval, via command line binary or docker container. Server and IOT builds for pull or push based device content management.
Stars: ✭ 19 (-70.77%)
Mutual labels:  configuration-management
ansible-sshjail
An Ansible connection plugin for provisioning FreeBSD jails remotely
Stars: ✭ 57 (-12.31%)
Mutual labels:  configuration-management
alpine-conf
[MIRROR] Alpine configuration management scripts
Stars: ✭ 38 (-41.54%)
Mutual labels:  configuration-management
infraverse
Infrastructure Platforms and Applications Comparison
Stars: ✭ 77 (+18.46%)
Mutual labels:  configuration-management
efs2
A dead-simple configuration management tool powered by stupid shell scripts.
Stars: ✭ 82 (+26.15%)
Mutual labels:  configuration-management

Managing complex configurations any other way would be highly illogical...

Quick Start · Documentation · Examples · Releases

About

spock is a framework that helps users easily define, manage, and use complex parameter configurations within Python applications. It lets you focus on the code you need to write instead of re-implementing boilerplate code such as creating ArgParsers, reading configuration files, handling dependencies, implementing type validation, maintaining traceability, etc.

spock configurations are normal python classes that are decorated with @spock. It supports inheritance, dynamic class dependencies, loading/saving configurations from/to multiple markdown formats, automatically generating CLI arguments, and hierarchical configuration by composition.

💥 Why You Should Use Spock 💥

  • Simple organized parameter definitions (i.e. a single line)
  • Type checked (static-eqsue) & frozen parameters (i.e. fail early during long ML training runs)
  • Complex parameter dependencies made simple (i.e. @spock class with a parameter that is an Enum of other @spock classes)
  • Fully serializable parameter state(s) (i.e. exactly reproduce prior runtime parameter configurations)
  • Automatic type checked CLI generation w/o argparser boilerplate (i.e click and/or typer for free!)
  • Easily maintain parity between CLIs and Python APIs (i.e. single line changes between CLI and Python API definitions)
  • Unified hyper-parameter definitions and interface (i.e. don't write different definitions for Ax or Optuna)
  • Resolver that supports value definitions from environmental variables, dynamic template re-injection, and encryption of sensitive values

Key Features

  • Simple Declaration: Type checked parameters are defined within a @spock decorated class. Supports required/optional and automatic defaults.
  • Easily Managed Parameter Groups: Each class automatically generates its own object within a single namespace.
  • Parameter Inheritance: Classes support inheritance (w/ lazy evaluation of inheritance/dependencies) allowing for complex configurations derived from a common base set of parameters.
  • Complex Types: Nested Lists/Tuples, List/Tuples of Enum of @spock classes, List of repeated @spock classes
  • Multiple Configuration File Types: Configurations are specified from YAML, TOML, or JSON files.
  • Hierarchical Configuration: Compose from multiple configuration files via simple include statements.
  • Command-Line Overrides: Quickly experiment by overriding a value with automatically generated command line arguments.
  • Immutable: All classes are frozen preventing any misuse or accidental overwrites (to the extent they can be in Python).
  • Tractability and Reproducibility: Save runtime parameter configuration to YAML, TOML, or JSON with a single chained command (with extra runtime info such as Git info, Python version, machine FQDN, etc). The saved markdown file can be used as the configuration input to reproduce prior runtime configurations.
  • Hyper-Parameter Tuner Addon: Provides a unified interface for defining hyper-parameters (via @spockTuner decorator) that supports various tuning/algorithm backends (currently: Optuna, Ax)
  • S3 Addon: Automatically detects s3:// URI(s) and handles loading and saving spock configuration files when an active boto3.Session is passed in (plus any additional S3Transfer configurations)

Quick Install

The basic install and [s3] extension require Python 3.6+ while the [tune] extension requires Python 3.7+

Base w/ S3 Extension w/ Hyper-Parameter Tuner
pip install spock-config pip install spock-config[s3] pip install spock-config[tune]

News/Releases

See Releases for more information.

Recent Changes

May 17th, 2022

  • Added support for resolving value definitions from environmental variables with the following syntax, ${spock.env:name, default}
  • Added .inject annotation that will write back the original env notation to the saved output
  • Added the .crypto annotation which provides a simple way to hide sensitive environmental variables while still maintaining the written/loadable state of the spock config

March 17th, 2022

  • Added support for typing.Callable types (includes advanced types such as List[List[Callable]])
  • Added support for typing.Dict types with type checking for types of both keys and values (includes advanced types such as Dict[str, Tuple[Callable, Callable]])
  • Added support for post init hooks that allow for validation on parameters defined within @spock decorated classes. Additionally, added some common validation check to utils (within, greater than, less than, etc.)
  • Updated unit tests to support Python 3.10

January 26th, 2022

  • Added evolve support to the underlying SpockBuilder class. This provides functionality similar to the underlying attrs library (attrs.evolve). evolve() creates a new Spockspace instance based on differences between the underlying declared state and any passed in instantiated @spock decorated classes.

January 18th, 2022

  • Support for lazy evaluation: (1) inherited classes do not need to be @spock decorated, (2) dependencies/references between spock classes can be lazily handled thus preventing the need for every @spock decorated classes to be passed into *args within the main SpockBuilder API
  • Updated main API interface for better top-level imports (backwards compatible): ConfigArgBuilder->SpockBuilder
  • Added stubs to the underlying decorator that should help with type hinting in VSCode (pylance/pyright)

Original Implementation

spock was originally developed by the Artificial Intelligence Center of Excellence at Fidelity Investments by Nicholas Cilfone and Siddharth Narayanan

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].