GithubHelp home page GithubHelp logo

typeconf's Introduction

TypeConf

The goal of this library is to help developers build more robust systems for academia as well as industry by avoiding configuration errors.

This is achieved by providing a library to build dynamic but typesafe configurations.

Features

  • Configuration checking through pydantic
  • Super simple integration of alternatives for ablation studies
  • Automatic CLI generation
  • Better visibility which parameters were used and which not
  • Testing of existing configurations to help maintain them

Benefits

  • No more bad awakings when a script fails because of wrong configuration
  • Tracking of which configuration parameters were used and which not
  • Easy and structured way to run ablation studies

Config Priority

There are multiple ways to set a value in the configuration. Conflicts are resolved in the following order (sorted in ascending order).

  1. Declaration Default (These should avoided in the first place and should always be overwritten by the configuration)
  2. Config Default
  3. Set as preset (either through cli or in config file)
  4. Set through config file
  5. Set through CLI
  6. Set in code before parsing
  7. Set in code after parsing (Can be prohibited by using pydantics (Faux Imutablility)[https://pydantic-docs.helpmanual.io/usage/models/#faux-immutability] This is meant to reflect most common use cases.

Installation

pip install -e .

Dependencies

  • pydantic

Examples

  • MNIST

Demo

  • examples/Demo.ipynb

TODO

Features

  • Easier integration of
    • classes
    • functions
    • libraries
  • Own cli parser for better support
  • Integrate into testing frameworks
  • Fast Presets: Same kind of parameters as a specific class, just about hyperparameters
  • click-style execution?

Examples

  • Ablation Study

Open Questions

  • Different namespaces for subclasses? For example, class2 inherits from class2, should they have a separate or joined namespace. See test.
  • Should build method be abstract? Is there a use case, where a ChildConfig
    does not need a build method?

CI/CD

  • versioneer
  • Automatic testing on push
  • black?
  • push to pypi

Documentation

  • Write README
  • Document Code
  • Setup read the docs

typeconf's People

Contributors

kilianyp avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

typeconf's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.