Skip to content

Use uv to manage development environment #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ target/
.ipynb_checkpoints

# pyenv
.python-version
# .python-version

# celery beat schedule file
celerybeat-schedule
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ to the [Max-SAT Evaluation
### Preparation

```console
$ pip3 install -r requirements.txt
$ uv sync
```

### (Optional) Training model
Expand All @@ -39,11 +39,11 @@ repository and should be used with caution.
Run the following to generate the same data set submitted to Max-SAT Evaluation 2020:

```console
$ python3 generate_maxsat_instances.py --dataset mnist --model models/mnist.npz -o outdir \
$ uv run generate_maxsat_instances.py --dataset mnist --model models/mnist.npz -o outdir \
--format wcnf --card totalizer --norm inf --target adversarial --instances-per-class 2
$ python3 generate_maxsat_instances.py --dataset mnist_rot --model models/mnist_rot.npz -o outdir \
$ uv run generate_maxsat_instances.py --dataset mnist_rot --model models/mnist_rot.npz -o outdir \
--format wcnf --card totalizer --norm inf --target adversarial --instances-per-class 2
$ python3 generate_maxsat_instances.py --dataset mnist_back_image --model models/mnist_back_image.npz -o outdir \
$ uv run generate_maxsat_instances.py --dataset mnist_back_image --model models/mnist_back_image.npz -o outdir \
--format wcnf --card totalizer --norm inf --target adversarial --instances-per-class 2
```

Expand All @@ -54,11 +54,11 @@ You can also specify an individual sample by using `--instance-no` instead of `-
You can use `generate_mip_instances.py` instead:

```console
$ python3 generate_mip_instances.py --dataset mnist --model models/mnist.npz -o outdir \
$ uv run generate_mip_instances.py --dataset mnist --model models/mnist.npz -o outdir \
--norm inf --target adversarial --instances-per-class 2
$ python3 generate_mip_instances.py --dataset mnist_rot --model models/mnist_rot.npz -o outdir \
$ uv run generate_mip_instances.py --dataset mnist_rot --model models/mnist_rot.npz -o outdir \
--norm inf --target adversarial --instances-per-class 2
$ python3 generate_mip_instances.py --dataset mnist_back_image --model models/mnist_back_image.npz -o outdir \
$ uv run generate_mip_instances.py --dataset mnist_back_image --model models/mnist_back_image.npz -o outdir \
--norm inf --target adversarial --instances-per-class 2
```

Expand All @@ -67,7 +67,7 @@ $ python3 generate_mip_instances.py --dataset mnist_back_image --model models/mn
Once the solver successfully solves a problem instance, you can check the solution as follows:

```console
$ python3 verify_solution.py --dataset mnist --instance 7 \
$ uv run verify_solution.py --dataset mnist --instance 7 \
--output-image perturbated.png \
--output-orig-image orig.png \
--format maxsat \
Expand Down
4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

Loading