Skip to content
Merged
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
7 changes: 5 additions & 2 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Docs
on: [push, pull_request, workflow_dispatch]
permissions:
contents: write
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.8' # Use Python 3.8
- name: Install dependencies
run: |
pip install -r requirements.txt
Expand All @@ -20,4 +23,4 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
publish_dir: ./docs/_build/html
15 changes: 2 additions & 13 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,13 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
- name: Set up Python 3.8 # Set Python version to 3.8 or 3.9
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
python-version: '3.8' # Change to a version compatible with TensorFlow
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Lint with flake8
run: |
conda install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python setup.py install
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pip install -r requirements.txt
To train a new **MNIST classifier** model from scratch, run the following command:

```bash
python main.py --iterations 50 --particles 100 --save_dir "analysis_results"
python taint_MNIST.py --iterations 50 --particles 100 --save_dir "analysis_results"
```

This command will:
Expand All @@ -90,7 +90,7 @@ This command will:
If you already have a pre-trained model, you can load it by providing the `--model_path` argument:

```bash
python main.py --model_path "path_to_model/mnist_model.keras" --iterations 50 --particles 100 --save_dir "analysis_results"
python taint_MNIST.py --model_path "path_to_model/mnist_model.keras" --iterations 50 --particles 100 --save_dir "analysis_results"
```

This will load the provided pre-trained model, evaluate it on the test dataset, and then perform the adversarial attack.
Expand Down
29 changes: 0 additions & 29 deletions docs/Swarm_Observer.rst

This file was deleted.

2 changes: 0 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@
import os
import sys
sys.path.insert(0, os.path.abspath('../Adversarial_Observation'))
sys.path.insert(1, os.path.abspath('../Swarm_Observer'))
sys.path.insert(2, os.path.abspath('../'))
from Adversarial_Observation.Attacks import *
from Adversarial_Observation.utils import *
from Adversarial_Observation.visualize import *
import Swarm_Observer

# -- Project information -----------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Welcome to Adversarial_Observation's documentation!
:caption: Contents:

Adversarial_Observation
Swarm_Observer
examples


Expand Down
1 change: 0 additions & 1 deletion docs/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ Adversarial_Observation
:maxdepth: 4

Adversarial_Observation
Swarm_Observer
setup
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ torch
torchvision
sphinx_rtd_theme
tensorflow
imageio[pyav]
imageio[pyav]
pytest