TAcq - Framework for Learning Compact Representations of Constraint Networks
A framework for learning compact representations of constraint networks. This project is based on the paper “Learning Compact Representations of Constraint Networks” to be published.
The code is organized in the following way:
src/: Contains the code for the experiments and the models.data/: Contains data used for some experiments.
You need to have the following dependencies installed:
- "languageFreeAcq~=0.0.7"
- "typing_extensions~=4.12.2"
- "ortools~=9.11.4210"
You can install them using pip:
pip install ortools
pip install tqdm
pip install languageFreeAcq
Use the TAcq framework in your code
You can install the TAcq framework using pip:
pip install tacq
Then, you can use it in your code as follows:
from tacq import TemplateAcquisition
ta = TemplateAcquisition()
ta.learn_from_file("examtimetabling_2.csv", 300, 1000)
print(ta.get_network())
print(ta.get_template())
Running using CLI
To run an experiment using CLI, you may use the following command:
python src/main.py <nb_examples> <examples_file> <timeout_solver> <verbose> <max_cpu>
Where <nb_examples> is the number of examples to use as training set, <examples_file> is the file containing
the examples (some are provided in the data/ directory), <max_cpu> is the maximum number of CPU cores,
<timeout_solver> is the timeout for each call to the solver in seconds, <verbose> is a flag to enable verbose
mode (1 for true, 0 for false),
Metadata
Release files for tacq 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tacq-0.0.3.tar.gz | 23.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tacq-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.3 kB
Release files / tacq-0.0.3.tar.gz
| Download URL | tacq-0.0.3.tar.gz |
|---|---|
| Size | 23.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4929ad8e9089ecd8679e5c5a832d0f35f8b92ef8f7e3bb72ff8f3d927f95f546
|
|
BLAKE2b-256 checksum How to use checksums |
e82fcdcb7b9c0294b67f323b6d126eb7838fc3e405bd8a831503ffef6060ba1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2025.
Transparency logRelease files / tacq-0.0.3-py3-none-any.whl
| Download URL | tacq-0.0.3-py3-none-any.whl |
|---|---|
| Size | 24.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
125bf12fa37bc8d2a966d049d536618fc6813a354b4541323722a9d0eb01f59f
|
|
BLAKE2b-256 checksum How to use checksums |
c2a281d183ce876f53db7f118143c24671f73453341c280ebd12dde71676a78d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2025.
Transparency log