EleutherAI / EleutherAI/concept-erasure

QuadraticEraser doesn't import the same way as LeaceEraser

Open
#8 1 comment 0 reactions 1 assignee Claimed by @norabelrose View on GitHub
Dominant language
Python
Stars
268
Forks
16
PR merge metrics
No merged PRs in 30d

Description

![image](https://github.com/EleutherAI/concept-erasure/assets/60300243/21d8b97a-c379-4ccb-bd82-fac16988bf43)
This was the only code that executed in the runtime, and the same thing happens for both CUDA and CPU instances.

Am I wrong in thinking QuadraticEraser is supposed to work the same as LeaceEraser?

Adapting the code from: https://github.com/EleutherAI/concept-erasure/blob/9689ef5223fe1e6b3b74cd5e90bf1c2bbba5537a/tests/test_leace.py#L18
also fails:
```
!pip install concept-erasure datasets transformers --quiet

from itertools import pairwise, product

import numpy as np
import pytest
import torch
import torch.nn.functional as F
from sklearn.datasets import make_classification
from sklearn.discriminant_analysis import QuadraticDiscriminantAnalysis
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import log_loss
from sklearn.svm import LinearSVC

from concept_erasure import (
ErasureMethod,
LeaceFitter,
OracleEraser,
OracleFitter,
QuadraticEraser,
optimal_linear_shrinkage,
)
from concept_erasure.optimal_transport import is_positive_definite
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.