DeepSynth2 is a high-level framework that enables to leverage program synthesis for other domains such as reinforcement learning or system design.
At a granular level, DeepSynth2 is a library that consists of the following components:
Component | Description |
---|---|
synth | A high level synthesis libary |
synth.generation | A compilation of tools to generate objects needed for the synthesis, it is mainly used with deep learning |
synth.nn | A library to build neural network with for synthesis |
synth.pbe | A library to work in the Programming By Example (PBE) framework |
synth.filter | A library with filtering strategies |
synth.semantic | A library of program evaluators |
synth.syntax | A library to manipulate dsl, grammars, probabilistic grammars |
synth.utils | Utility objects and functions that do not fit elsewhere |
Elaborating Further:
The advantage of "classic" algorithms are their theoretical guarantees. But many new deep learning based methods have emerged, they provide a tremendous efficiency but lose almost all theoretical guarantees. DeepSynth2 provides already implemented algorithms that combine both approaches to get the best of both worlds: speed and guarantees!
Computing is now done at a large scale in a parallelilized fashion. As such frameworks should also adapt: they should scale with more computing power but also leverage the power of parallelization. This was taken into account and this is why for most algorithms we provide, we also provide a way to scale with the number of available processors.
For example, you can split probabilistic grammars into disjoint sub grammars to split the enumeration of the grammar into multiple jobs thus enabling to scale linearly with the numbers of workers.
If you are installing from source, you will need Python 3.8 or later.
DeepSynth2 can be installed from source with pip
, conda
or poetry
.
pip install .
When using poetry
in an CUDA environment, then you need to follow every poetry install
or poetry update
with:
pip install torch
See this open issue of poetry for more information.
You might want to generate html pages of the documentation locally, where usage, contribution guidelines and more can be found. In which case, you will need to use Sphinx.
pip install sphinx sphinx-rtd-theme myst-parser
If Sphinx installation was successful, then use the following command line to generate html pages that you can view by opening the file docs/build/html/index.html
in your favorite web browser.
sphinx-build -b html docs/source docs/build/html
There are some known issues:
- seed = 0 is the same as no seeding.
- if you get an error after installation try to update/upgrade
numpy
, it is often due to a discrepancy between the version with whichvose
is compiled and the version the environment is running. - if you have issues with
vose
, you can just uninstallvose
, generation speed will be slower but everything will work. - some dependencies may be missing depending on the DSL you want to use, running any example script with -h will list you the list of available DSL with your current installation.
DeepSynth2 is a project initiated by Nathanaël Fijalkow and by Théo Matricon. It is based on the DeepSynth project of Nathanaël Fijalkow, Guillaume Lagarde, Théo Matricon, Kevin Ellis, Pierre Ohlmann, Akarsh Potta
Former:
- (2023) Félix Yvonnet did a 2 months internship to work on restarts, a future feature of DeepSynth2.
- (2023) Priscilla Tissot did a 7 weeks long internship working on the Carel neural network and trying to improve the performance of our prediction models.
- (2022) Gaëtan Margueritte did a four-month internship. He created the regexp and transduction DSLs, the first tutorial and first drafts of code related to the use of user defined constants.
- (2022) Utkarsh Rajan did a two-month internship. He contributed to the implementation of bucket search and worked on the tower DSL.
DeepSynth2 has a MIT license, as found in the LICENSE file.