• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

acttools/H08-Sep-2021-2,9601,999

apps/H08-Sep-2021-17,95916,811

binder/H03-May-2022-2514

src/H03-May-2022-1,441,3131,239,631

wrappers/H03-May-2022-1,129,3431,101,560

.clang-formatH A D08-Sep-20212.5 KiB9580

.clang-tidyH A D08-Sep-20214.3 KiB145145

.gitignoreH A D08-Sep-20212.3 KiB8776

.gitlab-ci.ymlH A D08-Sep-20216.8 KiB270255

.mailmapH A D08-Sep-20213.3 KiB5338

.readthedocs.ymlH A D08-Sep-2021618 2520

CHANGELOG.mdH A D08-Sep-202133.9 KiB744611

CONTRIBUTING.mdH A D08-Sep-20213.6 KiB6741

COPYINGH A D08-Sep-202134.3 KiB675553

COPYING.LESSERH A D08-Sep-20217.5 KiB166128

LICENSEH A D08-Sep-2021769 85

MakefileH A D08-Sep-20211.8 KiB5735

README.mdH A D08-Sep-20219.8 KiB226171

actH A D08-Sep-20213.8 KiB11766

purgeH A D08-Sep-2021348 1510

pylintrcH A D08-Sep-202119.2 KiB630472

README.md

1
2aGrUM is a C++ library designed for easily building applications using graphical
3models such as Bayesian networks, influence diagrams, decision trees or Markov
4decision processes.
5
6It is written to provide the basic building blocks to perform the following
7tasks :
8
9* graphical models learning/elicitation,
10* probabilistic inference with graphical models,
11* planification.
12
13For a less technical introduction, checkout
14[the project's homepage](http://agrum.gitlab.io).
15
16# Philosophy & Design
17
18aGrUM initial purpose was to support, sustain and share new frameworks and algorithms from the Graphical Models and
19Decision team at
20[LIP6](http://www.lip6.fr): [Christophe Gonzales](https://www.lip6.fr/actualite/personnes-fiche.php?ident=P37&LANG=en),
21[Pierre-Henri Wuillemin](https://www.lip6.fr/actualite/personnes-fiche.php?ident=P67) and
22[students and former students](http://agrum.gitlab.io/pages/hall-of-fame.html). aGrUM then took the form of a
23generic framework designed to ease the emergence and experimentation of new ideas. More and more, as a consequence,
24it began to fulfill all the requirements for providing a complete library to build applications using Probabilistic
25Graphical Models, with a strong emphasis on Bayesian networks. Once the prohect reached this state, the team decided
26to provide it as an open source contribution for the decision support and data science communities. The last move in
27that direction has been to port its main code repository at gitlab.
28
29aGrUM main goals include code quality, code reuse and performance: aGrUM is written in modern C++11/17
30(cross-platform: gcc>=4.8, clang and visual C++); tests and continuous integration are at the core of aGrUM's
31development; many classical algorithms have been reimplemented and multi-threaded to speed up learning and inference.
32
33Moreover, aGrUM allows its users to very finely tune learning (choosing priors, score, constraints, algorithms and
34more), inference (choosing their algorithms but also their components like message passing algorithms, triangulation
35algorithms, etc.) and modeling (choosing the type of discrete variables, making qualitative and quantitative
36introspection in the model, etc.). The different frameworks (Bayesian networks, influence diagram, credal networks,
37FMDP, etc.) are treated in the same way (see [here](http://agrum.gitlab.io/pages/agrum.html) for a more exhaustive
38list of features).
39
40## Wrappers
41
42The main drawback of such a complex toolbox is of course the long and arduous learning curve associated to its
43inherent complexities. It is the reason why it has been decided to ship wrappers in easier language with easier APIs
44together with aGrUM. pyAgrum (for python) is the main wrapper of aGrUM. jAgrum and other experimental wrappers could
45be shipped soon (if needed or asked).
46
47aGrUM uses [swig](http://www.swig.org/) to build these wrappers.
48
49## Documentation
50
51Documentation is a never-ending story for a library with a complex API. The team tries its best to keep
52- [doxygen aGrUM documentation](http://docs.agrum.org/aGrUM/latest/)
53- [sphinx pyAgrum documentation](https://pyagrum.readthedocs.io/en/latest/)
54- [jupyter notebooks as tutorials](http://www-desir.lip6.fr/~phw/aGrUM/docs/last/notebooks/) (pyAgrum)
55
56up to date but maintaining them is a difficult task and we are actively looking for people to help us writing
57those documentations and tutorials.
58
59## Dependencies
60
61aGrUM's team tries its best to not introduce external dependencies with aGrUM  (understand no external dependencies
62for the C++ code of aGrUM). All external dependencies are included in aGrUM's source. At the moment the external
63programs shipped with aGrUM are:
64- [nanodbc](https://github.com/lexicalunit/nanodbc)
65- [lrs](http://cgm.cs.mcgill.ca/~avis/C/lrs.html)
66- [tinyxml](http://www.grinninglizard.com/tinyxml/)
67- [CxxTest](http://cxxtest.com/)
68
69pyAgrum's dependencies can be found in `wrappers/pyAgrum/requirements.txt` and `wrappers/pyAgrum/optional_requirements.txt`.
70
71# Project Structure
72
73The project's root is composed of the following folders:
74- [acttools](/acttools): implementation of ACT, the aGrUM Compiler Tool
75- [apps](/apps): Examples using aGrUM or pyAgrum
76- [src](/src): aGrUM's C++ source code
77- [wrappers](/wrappers): aGrUM's wrappers
78
79In [src](/src) you can find the following folders:
80- [agrum](/src/agrum): aGrUM's C++ source code
81- [cmake](/src/cmake): CMake files used to compile aGrUM
82- [docs](/src/docs): aGrUM's documentation
83- [testunits](/src/testunits): aGrUM's tests
84
85In [wrappers](/wrappers) you can find the following folders:
86- [swig](/wrappers/swig): generic files declaring the part of aGrUM's API that will be wrapped.
87- [pyAgrum](/wrapper/pyAgrum): pyAgrum files (including proper tests and sphinx documentation)
88- [jAgrum](/wrappers/jAgrum): experimental java wrapper
89
90# Building
91
92It is strongly recommended to use ACT to build aGrUM. Act requires Python (>=3.7)
93and you will need, depending of your platform, the following tools:
94- Linux:
95    - Python
96    - g++
97    - CMake
98- MacOS:
99    - Python
100    - xCode
101    - CMake
102- Microsoft Windows:
103    - Python
104    - Microsoft Visual 2015 Comunity Edition
105    - CMake
106
107If you chose not to use ACT, you can directly use CMake to build aGrUM, but you will need
108some tweaking to run tests or use specific compilation options.
109
110## act: aGrUM Compilation Tool
111
112To get the full list of `act` commands, you can run `act --help`. `act` uses three
113agruments: a `target`, a `version` and an `action`. Values for each argument do
114not intersect, so order is not important.
115
116The `target` argument tells ACT what to build: `aGrUM`, `pyAgrum` or `jAgrum`.
117
118The `version` argument tells ACT to build either in `release` or `debug`.
119
120The `action` argument tells ACT what to do one the build is finished. Some actions
121are only available for one target. For example the `wheel` action only works with
122the `pyAgrum` target and builds the pyAgrum Python wheel.
123
124Common actions to all targets are:
125- `install`: installs the target, use option `-d` to set installation path
126- `uninstall`: uninstalls the target
127- `test`: execute tests for the given target
128- `lib`: compiles the target
129- `doc`: builds the target's documentation
130
131Actions `install`, `uninstall` and `test` are self explanatory (we will cover
132options later). Action `lib` will just compile the target.
133
134Some actions are not related to any target:
135- `clean`: cleans the build folder
136- `autoindent`: applies clang formatting to all C++ source code
137- `show`: shows current values for each options of act
138
139`act` caches the last command, so you can simply execute `act` to rerun the previous
140command.
141
142One action only applies to the target `pyAgrum`:
143- wheel: builds a PIP wheel, use option `-d` to define the wheels localisation
144
145## Building aGrUM
146To build aGrUM, the following command can be used: `act test release aGrUM`.
147
148Testing your build IS recommended, but it running all tests is long so use action
149`lib` to not run any tests or use option `-m` or `-t` to reduce the number of test.
150
151## Building pyAgrum
152To build pyAgrum, the following command can be used: `act test release pyAgrum`.
153
154As for aGrUM, testing your build IS recommended. You can use action `lib` to not
155run any tests or use option `-t quick` to not execute notebooks tests (which are
156quite long).
157
158### Building Wheels
159To build a wheel of pyAgrum use the following command: `act wheel release pyAgrum -d $(pwd)`
160to copy the wheel in your current folder.
161
162Building wheels do not use CMake to compile aGrUM and pyAgrum, so the compile can be
163quite longer on some systems.
164
165### Building Conda Packages
166Conda package are automatically build [here](https://github.com/conda-forge/pyagrum-feedstock).
167
168## Building with MVSC
169To build with MVSC you will need to use the same commands as stated above with
170the option `--mvsc` for 64 bits builds or `--mvsc32` for 32 bits builds.
171
172# Contributing
173To contribute to aGrUM, you should fork the project and proceed with a merge request
174one your contribution is done.
175
176Please note that there is a contribution policy to sign and email us before we
177can accept any contribution. You can find the details for upload your contribution
178agreement [here](https://gitlab.com/agrumery/aGrUM/blob/master/CONTRIBUTING.md).
179
180# Branches
181We use the following convention for branch names:
182- `documentation/*` for documentation branches
183- `internal/*` for any utility development (CI, act, etc..)
184- `bug/*` for debugging
185- `feature/*` for implementing new features
186- `backport/*` for maintaining specific tags
187
188# Continuous Integration
189Each commits are tested on Ubuntu 17.04, Mac OS El Capitan and Windows 10. The build
190process as follow:
1911. Builds aGrUM on all platforms
1922. Builds pyAgrum on all platforms
1933. Tests aGrUM on all platforms
1944. Tests pyAgrum on all platforms
195
196We are continuously improving on automatic builds, so expect this to change on a
197regularly basis.
198
199# Testing
200
201## Testing aGrUM
202Testing aGrUM is done using action `test` on target `aGrUM`. Important options are:
203- `-m MODULES`: executes tests for modules specified by `MODULES`
204- `-t TESTS`: executes tests for tests suites specified by `TESTS`
205
206The `-t` option supersedes `-m` options, but act will raise an error if you ask
207for test suites not in the modules list set by `-m`.
208
209Test files are located in [src/testunits](/src/testunits). Test suites are placed
210in there respective module folder:
211- [module_BASE](/src/testunits/module_BASE) is used to test modules core, graph,
212multidim, variables
213- module_XXXX is used to test module agrum/XXX
214
215## Testing pyAgrum
216Testing pyAgrum is done using action `test` on target `pyAgrum`. It is not possible
217to test a single test suite for pyAgrum, you can however run tests including
218notebooks with option `-t all` or only tests with `-t quick`.
219
220Notebooks are not written with the intent to serve as tests, but we find it
221useful to make our tests fails when a given cell in a notebooks fails to keep
222them up-to-date.
223
224# Bibliography
225See [aGrUM's reference](https://agrum.gitlab.io/pages/reference.html).
226