Fiddle is a Python-first configuration library particularly well suited to ML applications.

Related tags

Deep Learning fiddle
Overview

Fiddle

Fiddle is a Python-first configuration library particularly well suited to ML applications. Fiddle enables deep configurability of parameters in a program, while allowing configuration to be expressed in readable and maintainable Python code.

Additional details can be found in the documentation.

Setup

Install Fiddle with pip:

pip install fiddle-config

Install Fiddle from source:

git clone https://github.com/google/fiddle
cd fiddle
python -m setup.py install

Import Fiddle:

import fiddle as fdl
Comments
  • Get rid of all sphinx warnings (with one exception).

    Get rid of all sphinx warnings (with one exception).

    This change fixes all sphinx warnings when building the fiddle docs with only one exception: the warning that both index.rst and index.md exist.

    Note: this has been tested with a clean virtualenv + install (which caught the missing graphviz dependency).

    opened by saeta 1
  • Skip copying HistoryEntry dataclasses, which are immutable. This should be

    Skip copying HistoryEntry dataclasses, which are immutable. This should be

    Skip copying HistoryEntry dataclasses, which are immutable. This should be correct almost all of the time, though it may have different behavior if a sub-configuration (stored in the new_value field of a HistoryEntry) is mutated later. But this is perhaps a more general problem for the API; if we wanted to solve it then we should deepcopy the value stored in the new_value field when creating HistoryEntry's.

    Python doesn't do this automatically because it can't guarantee that a dataclass is actually/effectively immutable just because it is frozen.

    opened by copybara-service[bot] 1
  • Update `replace_unconfigured_partials_with_callables` to replace Partials with their Callables if the only arguments that are passed are equivalent to the corresponding default argument.

    Update `replace_unconfigured_partials_with_callables` to replace Partials with their Callables if the only arguments that are passed are equivalent to the corresponding default argument.

    Update replace_unconfigured_partials_with_callables to replace Partials with their Callables if the only arguments that are passed are equivalent to the corresponding default argument.

    opened by copybara-service[bot] 1
  • Get rid of BuildError and adopt solution from Gin, which uses subclassing to attach some additional error information.

    Get rid of BuildError and adopt solution from Gin, which uses subclassing to attach some additional error information.

    Get rid of BuildError and adopt solution from Gin, which uses subclassing to attach some additional error information.

    We have chosen to go with this slightly magical approach, since the stack traces from Python's raise new_error from old_error feature shows the user Fiddle internal stack trace lines first, even when the error is clearly from user code.

    opened by copybara-service[bot] 1
  • Configurator pattern, which might be a useful mid-level API option when

    Configurator pattern, which might be a useful mid-level API option when

    Configurator pattern, which might be a useful mid-level API option when auto_config is too magical.

    The configurator is inspired by (basically a Fiddle version of) https://detectron2.readthedocs.io/en/latest/tutorials/lazyconfigs.html , though we also pass through technically-incorrect type signatures so that we get static type checking of arguments similar to auto_config.

    Example usage:

    encoder = C(Encoder)( embedders={ "tokens": shared_token_embedder, "position": None }, attention=C(Attention)(dtype, kernel_init, bias_init), mlp=C(Mlp)(dtype, False, ["embed", "num_heads", "head_dim"]), )

    opened by copybara-service[bot] 1
  • Import error

    Import error

    I am trying to run this colab from the documentation but importing fails when running the first cell.

    Collecting fiddle
      Downloading fiddle-0.2.2-py3-none-any.whl (233 kB)
         |████████████████████████████████| 233 kB 7.6 MB/s 
    Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from fiddle) (4.1.1)
    Collecting libcst
      Downloading libcst-0.4.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB)
         |████████████████████████████████| 2.7 MB 54.7 MB/s 
    Requirement already satisfied: pyyaml>=5.2 in /usr/local/lib/python3.7/dist-packages (from libcst->fiddle) (6.0)
    Collecting typing-inspect>=0.4.0
      Downloading typing_inspect-0.8.0-py3-none-any.whl (8.7 kB)
    Collecting mypy-extensions>=0.3.0
      Downloading mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
    Installing collected packages: mypy-extensions, typing-inspect, libcst, fiddle
    Successfully installed fiddle-0.2.2 libcst-0.4.7 mypy-extensions-0.4.3 typing-inspect-0.8.0
    Traceback (most recent call last):
    
      File "/usr/local/lib/python3.7/dist-packages/IPython/core/interactiveshell.py", line 3326, in run_code
        exec(code_obj, self.user_global_ns, self.user_ns)
    
      File ["<ipython-input-1-ba42286d1387>"](https://localhost:8080/#), line 3, in <module>
        import fiddle as fdl
    
      File "/usr/local/lib/python3.7/dist-packages/fiddle/__init__.py", line 18, in <module>
        from fiddle.building import build
    
      File "/usr/local/lib/python3.7/dist-packages/fiddle/building.py", line 22, in <module>
        from fiddle import config
    
      File "/usr/local/lib/python3.7/dist-packages/fiddle/config.py", line 86
        def __init__(self, fn_or_cls: Union['Buildable', TypeOrCallableProducingT], /,
                                                                                    ^
    SyntaxError: invalid syntax
    opened by mrpep 1
  • Drop py3.7.

    Drop py3.7.

    Fiddle intends to drop support for Python 3.7 as it is beyond EoL. Additionally, by dropping Py3.7, we can better support all sorts of argument names.

    opened by saeta 0
  • Fix bug where applying auto_config to a lambda could fail if the lambda expression was wrapped in a larger multi-line expression, such that `inspect.getsource(fn)` does not form a valid python statement.

    Fix bug where applying auto_config to a lambda could fail if the lambda expression was wrapped in a larger multi-line expression, such that `inspect.getsource(fn)` does not form a valid python statement.

    Fix bug where applying auto_config to a lambda could fail if the lambda expression was wrapped in a larger multi-line expression, such that inspect.getsource(fn) does not form a valid python statement.

    opened by copybara-service[bot] 0
  • Fix bug where applying auto_config to a lambda could fail if the lambda expression was wrapped in a larger multi-line expression, such that `inspect.getsource(fn)` does not form a valid python statement.  E.g.:

    Fix bug where applying auto_config to a lambda could fail if the lambda expression was wrapped in a larger multi-line expression, such that `inspect.getsource(fn)` does not form a valid python statement. E.g.:

    Fix bug where applying auto_config to a lambda could fail if the lambda expression was wrapped in a larger multi-line expression, such that inspect.getsource(fn) does not form a valid python statement. E.g.:

    foo = ( lambda: f(3))

    (Note that "lambda: f(3))" is not valid Python because of the trailing close-paren.)

    opened by copybara-service[bot] 0
Owner
Google
Google ❤️ Open Source
Google
A modular, primitive-first, python-first PyTorch library for Reinforcement Learning.

TorchRL Disclaimer This library is not officially released yet and is subject to change. The features are available before an official release so that

Meta Research 860 Jan 7, 2023
PyKale is a PyTorch library for multimodal learning and transfer learning as well as deep learning and dimensionality reduction on graphs, images, texts, and videos

PyKale is a PyTorch library for multimodal learning and transfer learning as well as deep learning and dimensionality reduction on graphs, images, texts, and videos. By adopting a unified pipeline-based API design, PyKale enforces standardization and minimalism, via reusing existing resources, reducing repetitions and redundancy, and recycling learning models across areas.

PyKale 370 Dec 27, 2022
Transfer-Learn is an open-source and well-documented library for Transfer Learning.

Transfer-Learn is an open-source and well-documented library for Transfer Learning. It is based on pure PyTorch with high performance and friendly API. Our code is pythonic, and the design is consistent with torchvision. You can easily develop new algorithms, or readily apply existing algorithms.

THUML @ Tsinghua University 2.2k Jan 3, 2023
Gin provides a lightweight configuration framework for Python

Gin Config Authors: Dan Holtmann-Rice, Sergio Guadarrama, Nathan Silberman Contributors: Oscar Ramirez, Marek Fiser Gin provides a lightweight configu

Google 1.7k Jan 3, 2023
2D Time independent Schrodinger equation solver for arbitrary shape of well

Schrodinger Well Python Python solver for timeless Schrodinger equation for well with arbitrary shape https://imgur.com/a/jlhK7OZ Pictures of circular

WeightAn 24 Nov 18, 2022
Official code for the CVPR 2021 paper "How Well Do Self-Supervised Models Transfer?"

How Well Do Self-Supervised Models Transfer? This repository hosts the code for the experiments in the CVPR 2021 paper How Well Do Self-Supervised Mod

Linus Ericsson 157 Dec 16, 2022
Code for pre-training CharacterBERT models (as well as BERT models).

Pre-training CharacterBERT (and BERT) This is a repository for pre-training BERT and CharacterBERT. DISCLAIMER: The code was largely adapted from an o

Hicham EL BOUKKOURI 31 Dec 5, 2022
The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.

The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.

MIC-DKFZ 1.2k Jan 4, 2023
An extremely simple, intuitive, hardware-friendly, and well-performing network structure for LiDAR semantic segmentation on 2D range image. IROS21

FIDNet_SemanticKITTI Motivation Implementing complicated network modules with only one or two points improvement on hardware is tedious. So here we pr

YimingZhao 54 Dec 12, 2022
ImageNet-CoG is a benchmark for concept generalization. It provides a full evaluation framework for pre-trained visual representations which measure how well they generalize to unseen concepts.

The ImageNet-CoG Benchmark Project Website Paper (arXiv) Code repository for the ImageNet-CoG Benchmark introduced in the paper "Concept Generalizatio

NAVER 23 Oct 9, 2022
[NeurIPS 2021] Well-tuned Simple Nets Excel on Tabular Datasets

[NeurIPS 2021] Well-tuned Simple Nets Excel on Tabular Datasets Introduction This repo contains the source code accompanying the paper: Well-tuned Sim

null 52 Jan 4, 2023
CCPD: a diverse and well-annotated dataset for license plate detection and recognition

CCPD (Chinese City Parking Dataset, ECCV) UPdate on 10/03/2019. CCPD Dataset is now updated. We are confident that images in subsets of CCPD is much m

detectRecog 1.8k Dec 30, 2022
Learning Lightweight Low-Light Enhancement Network using Pseudo Well-Exposed Images

Learning Lightweight Low-Light Enhancement Network using Pseudo Well-Exposed Images This repository contains the implementation of the following paper

Seonggwan Ko 9 Jul 30, 2022
Code to use Augmented Shapiro Wilks Stopping, as well as code for the paper "Statistically Signifigant Stopping of Neural Network Training"

This codebase is being actively maintained, please create and issue if you have issues using it Basics All data files are included under losses and ea

J K Terry 32 Nov 9, 2021
Benchmark spaces - Benchmarks of how well different two dimensional spaces work for clustering algorithms

benchmark_spaces Benchmarks of how well different two dimensional spaces work fo

Bram Cohen 6 May 7, 2022
Sequential Model-based Algorithm Configuration

SMAC v3 Project Copyright (C) 2016-2018 AutoML Group Attention: This package is a reimplementation of the original SMAC tool (see reference below). Ho

AutoML-Freiburg-Hannover 778 Jan 5, 2023
My personal Home Assistant configuration.

About This is my personal Home Assistant configuration. My guiding princile is to have full local control of all my devices. I intend everything to ru

Chris Turra 13 Jun 7, 2022
Interactive Terraform visualization. State and configuration explorer.

Rover - Terraform Visualizer Rover is a Terraform visualizer. In order to do this, Rover: generates a plan file and parses the configuration in the ro

Tu Nguyen 2.3k Jan 7, 2023
Public scripts, services, and configuration for running a smart home K3S network cluster

makerhouse_network Public scripts, services, and configuration for running MakerHouse's home network. This network supports: TODO features here For mo

Scott Martin 1 Jan 15, 2022