Skip to content
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

Improve README.md #28

Merged
merged 6 commits into from
Nov 3, 2023
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
33 changes: 33 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Python application

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.10
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv install --dev
- name: Lint with flake8
run: |
pipenv run flake8 pulling_ace tests
- name: Test with pytest
run: |
pipenv run pytest
- name: Typecheck with mypy
run: |
pipenv run mypy pulling_ace/**/*.py
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy
FROM base AS runtime

# Copy virtual env from python-deps stage
COPY --from=python-deps /.venv /.venv
COPY --from=python-deps /app/.venv /app/.venv
ENV PATH="/.venv/bin:$PATH"

# Create and switch to a new user
Expand Down
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ PullingAce is a Python library designed to benchmark adversarial attacks on Hugg

## Installation

To get started with PullingAce, you can install it using pip:
To get started with PullingAce, follow these steps:

- Clone the repository: `git clone https://github.com/<username>/pullingace.git`
- Navigate to the root directory: `cd pullingace`
- Install the package using pip:

```bash
pip install pullingace
Expand All @@ -29,6 +33,31 @@ pullingace --attack tomato --model "textattack/albert-base-v2-ag-news" --dataset
```

## Credits
## Features for Generative Models
=======
## Features for Generative Models

- **Prompt Injection**: PullingAce integrates the prompt injection feature from the Garak library, allowing for more dynamic and flexible adversarial attacks.
- **Toxicity Features**: PullingAce incorporates Garak's toxicity features, providing additional metrics for evaluating model robustness.
- **Garak Integration**: By integrating features from the Garak library, PullingAce offers a wider range of attack strategies and evaluation metrics.

### CLI Example
```bash
# Replace with a specific command for prompt injection
pullingace --attack promptinjection --model "textattack/albert-base-v2-ag-news" --dataset "ag_news" --num-examples 5
```
## Features for Classification
=======
## Features for Classification

### CLI Example
```bash
pullingace --attack tomato --model "textattack/albert-base-v2-ag-news" --dataset "ag_news" --num-examples 5
```

### How is PullingAce different from TextAttack?

PullingAce uses built-in recipes from the TextAttack library but provides additional features and customizations.
This package was created with Cookiecutter and the [sourcery-ai/python-best-practices-cookiecutter](https://github.com/sourcery-ai/python-best-practices-cookiecutter) project template.


Expand Down
Loading