-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from Quinten-D/add_documentation
Add documentation
- Loading branch information
Showing
9 changed files
with
287 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
API Documentation | ||
================= | ||
|
||
embeddings | ||
---------- | ||
.. automodule:: deepproblog.embeddings | ||
:members: | ||
:show-inheritance: | ||
|
||
tensor | ||
------ | ||
.. automodule:: deepproblog.tensor | ||
:members: | ||
:show-inheritance: | ||
|
||
query | ||
----- | ||
.. automodule:: deepproblog.query | ||
:members: | ||
:show-inheritance: | ||
|
||
dataset | ||
------- | ||
.. automodule:: deepproblog.dataset | ||
:members: | ||
:show-inheritance: | ||
|
||
|
||
network | ||
------- | ||
.. automodule:: deepproblog.network | ||
:members: | ||
:show-inheritance: | ||
|
||
optimizer | ||
--------- | ||
.. automodule:: deepproblog.optimizer | ||
:members: | ||
:show-inheritance: | ||
|
||
model | ||
----- | ||
.. autoclass:: deepproblog.model.Model | ||
:members: | ||
|
||
train | ||
----- | ||
.. automodule:: deepproblog.train | ||
:members: | ||
:show-inheritance: | ||
|
||
evaluate | ||
-------- | ||
.. automodule:: deepproblog.evaluate | ||
:members: | ||
:show-inheritance: | ||
|
||
solver | ||
------- | ||
.. automodule:: deepproblog.solver | ||
:members: | ||
:show-inheritance: | ||
|
||
engine | ||
------ | ||
.. automodule:: deepproblog.engines.engine | ||
:members: | ||
:show-inheritance: | ||
|
||
semiring | ||
-------- | ||
.. automodule:: deepproblog.semiring | ||
:members: | ||
:show-inheritance: | ||
|
||
arithmetic circuit | ||
------------------ | ||
.. autoclass:: deepproblog.arithmetic_circuit.ArithmeticCircuit | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. | ||
#import pathlib | ||
#import sys | ||
#sys.path.insert(0, pathlib.Path(__file__).parents[2].resolve().as_posix()) | ||
|
||
import sys | ||
import os | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# sys.path.insert(0, os.path.abspath('.')) | ||
|
||
sys.path.insert(0, os.path.abspath("../../")) | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = 'DeepProbLog' | ||
copyright = '2023, KU Leuven, DTAI Research Group' | ||
author = 'KU Leuven, DTAI Research Group' | ||
#release = '1.0' | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.intersphinx", | ||
"sphinx.ext.todo", | ||
"sphinx.ext.coverage", | ||
"sphinx.ext.mathjax", | ||
"sphinx.ext.graphviz", | ||
"sphinx.ext.ifconfig", | ||
"sphinx.ext.viewcode", | ||
"sphinx.ext.inheritance_diagram", | ||
] | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = [] | ||
|
||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = 'furo' | ||
html_static_path = ['_static'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.. DeepProbLog documentation master file, created by | ||
sphinx-quickstart on Tue Aug 8 11:25:48 2023. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
DeepProbLog | ||
======================================= | ||
Welcome to DeepProbLog's documentation. | ||
|
||
DeepProbLog is an extension of ProbLog that integrates Probabilistic Logic Programming with deep learning by introducing the neural predicate. The neural predicate represents probabilistic facts whose probabilites are parameterized by neural networks. | ||
|
||
.. raw:: html | ||
|
||
<br /> | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
install | ||
problog | ||
neural_predicate | ||
api | ||
|
||
|
||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Installing DeepProbLog | ||
====================== | ||
|
||
Installation | ||
------------ | ||
DeepProbLog can easily be installed using the following command: | ||
Make sure the following packages are installed: | ||
|
||
.. code-block:: bash | ||
pip install deepproblog | ||
Test | ||
---- | ||
To make sure your installation works, install pytest | ||
|
||
.. code-block:: bash | ||
pip install pytest | ||
and run | ||
|
||
.. code-block:: bash | ||
python -m deepproblog test | ||
Requirements | ||
------------ | ||
|
||
DeepProbLog has the following requirements: | ||
|
||
* Python > 3.9 | ||
* [ProbLog](https://dtai.cs.kuleuven.be/problog/) | ||
* [PySDD](https://pysdd.readthedocs.io/en/latest/) | ||
* [PyTorch](https://pytorch.org/) | ||
* [TorchVision](https://pytorch.org/vision/stable/index.html) | ||
|
||
Approximate Inference | ||
--------------------- | ||
To use Approximate Inference, we have the followign additional requirements | ||
|
||
* [PySwip](https://github.com/ML-KULeuven/pyswip) | ||
|
||
.. code-block:: | ||
pip install git+https://github.com/ML-KULeuven/pyswip | ||
* [SWI-Prolog < 9.0.0](https://www.swi-prolog.org/) | ||
|
||
The latter can be installed on Ubuntu with the following commands: | ||
|
||
.. code-block:: bash | ||
sudo apt-add-repository ppa:swi-prolog/stable | ||
sudo apt install swi-prolog=8.4* swi-prolog-nox=8.4* swi-prolog-x=8.4* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
DeepProbLog and the Neural Predicate | ||
==================================== | ||
|
||
Information about the neural predicate is available `here <https://dtai.cs.kuleuven.be/stories/post/robin-manhaeve/deepproblog/>`_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ProbLog | ||
======= | ||
|
||
ProbLog documentation and tutorials are available `here <https://dtai.cs.kuleuven.be/problog/>`_. |