Skip to main content

A framework for learning compact representations of constraint networks.

Project description

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),

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tacq-0.0.3.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tacq-0.0.3-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file tacq-0.0.3.tar.gz.

File metadata

  • Download URL: tacq-0.0.3.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tacq-0.0.3.tar.gz
Algorithm Hash digest
SHA256 4929ad8e9089ecd8679e5c5a832d0f35f8b92ef8f7e3bb72ff8f3d927f95f546
MD5 041bed4f9f29d14c8751a159a55aaa28
BLAKE2b-256 e82fcdcb7b9c0294b67f323b6d126eb7838fc3e405bd8a831503ffef6060ba1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tacq-0.0.3.tar.gz:

Publisher: build_test_deploy.yml on Hareski/TAcq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tacq-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: tacq-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tacq-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 125bf12fa37bc8d2a966d049d536618fc6813a354b4541323722a9d0eb01f59f
MD5 26d3441e9ffbd22af0d5b8fae9d2b951
BLAKE2b-256 c2a281d183ce876f53db7f118143c24671f73453341c280ebd12dde71676a78d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tacq-0.0.3-py3-none-any.whl:

Publisher: build_test_deploy.yml on Hareski/TAcq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page