Skip to content

Commit

Permalink
Init open-unlearning
Browse files Browse the repository at this point in the history
  • Loading branch information
Dornavineeth committed Feb 25, 2025
1 parent a207a34 commit 9be0625
Show file tree
Hide file tree
Showing 247 changed files with 5,844 additions and 786,370 deletions.
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Picked from https://github.com/huggingface/transformers/blob/main/.github/ISSUE_TEMPLATE/bug-report.yml
name: "\U0001F41B Bug Report"
description: Submit a bug report to help us improve open-unlearning
labels: [ "bug" ]
body:
- type: checkboxes
id: information-scripts-examples
attributes:
label: Information
description: 'The problem arises when using:'
options:
- label: "The official example scripts"
- label: "My own modified scripts"

- type: checkboxes
id: information-tasks
attributes:
label: Tasks
description: "The tasks I am working on are:"
options:
- label: "An officially supported task"
- label: "My own task or dataset (give details below)"

- type: textarea
id: reproduction
validations:
required: true
attributes:
label: Reproduction
description: |
Please provide a code sample that reproduces the problem you ran into.
Please include relevant config information such as deepspeed configs and experiment configs in .hydra folder of your experiment.
If you have code snippets, error messages, stack traces please provide them here as well.
Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting
Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.
placeholder: |
Steps to reproduce the behavior:
1.
2.
3.
- type: textarea
id: expected-behavior
validations:
required: true
attributes:
label: Expected behavior
description: "A clear and concise description of what you would expect to happen."
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Picked from https://github.com/huggingface/transformers/blob/main/.github/ISSUE_TEMPLATE/config.yml
blank_issues_enabled: true
version: 2.1
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Picked from https://github.com/huggingface/transformers/blob/main/.github/ISSUE_TEMPLATE/feature-request.yml
name: "\U0001F680 Feature request"
description: Submit a proposal/request for a new open-unlearning feature
labels: [ "Feature request" ]
body:
- type: checkboxes
id: information-tasks
attributes:
label: Tasks
description: "New feature belongs to adding"
options:
- label: "Benchmark"
- label: "Unlearning method"
- label: "Evaluation"
- label: "Dataset"
- label: "None of the above"

- type: textarea
id: feature-request
validations:
required: true
attributes:
label: Feature request
description: |
A clear and concise description of the feature proposal. Please provide a link to the paper and code in case they exist.
- type: textarea
id: motivation
validations:
required: true
attributes:
label: Motivation
description: |
Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# What does this PR do?


Fixes # (issue)


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Have you gone through the documentation of adding new [components](../docs/components.md)?
- [ ] Did you make sure to update the documentation with your changes? Here are the pointers to documentation
[documentation guidelines](../README.md#-further-documentation).
61 changes: 61 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: tests

on:
# push:
# paths:
# - "**.py"
# - "requirements.txt"
# - ".github/workflows/*.yml"
pull_request:
paths:
- "**.py"
- "requirements.txt"
- ".github/workflows/*.yml"

jobs:
tests:
strategy:
fail-fast: false
matrix:
python-version:
- "3.11"
os:
- "ubuntu-latest"

runs-on: ubuntu-latest

environment:
name: tests

env:
# HF_TOKEN: ${{ secrets.HF_TOKEN }}
OS_NAME: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "setup.py"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff==0.6.6
# python -m pip install git+https://github.com/huggingface/transformers.git
# python -m pip install ".[torch,dev]"

- name: Check Quality
run: make quality

# - name: Check Style
# run: make style

# - name: Test with pytest
# run: |
# cd LLaMA-Factory
# make test
205 changes: 180 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,183 @@
.vscode/
# custom .gitignore
submit.py
!src/data/__init__.py
logs/
unity/
src/data/test.py
src/data/__pycache__
ms_cache/
logs/
hf_cache/
cache*/
saves*/
notebooks/
output*/
wandb/
checkpints/
paper_models/
unlearn_author/unlearning_ckpt/
unlearn_author/unlearning_ckpt3/
unlearn_author/__pycache__/
data/
!*/data/
evals/
!*/evals/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
eval_logs/
eval_dumps/
# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
.ruff_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
unlearn_author/.ipynb_checkpoints/
unlearn_author/checkpints/
unlearn_author/outputs/
mlruns/
outputs/
unlearning_ckpt2/
debug*/
tool.ipynb
__pycache__
*.err
*.out
*.sh
paper_models
notebook/

*.ttf
scripts/
reproduce.ipynb
upload_to_hf.py

.vscode/
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
args: [--fix, scripts, src]
- id: ruff-format
args: [scripts, src]
Loading

0 comments on commit 9be0625

Please sign in to comment.