Skip to content

Commit

Permalink
minor cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyaoi committed Oct 26, 2022
1 parent 5f96d5e commit 8449382
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion app/appraiser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from numpy.typing import ArrayLike
from typing import List

class Appraiser():
Expand Down
2 changes: 1 addition & 1 deletion app/baselines/datascope_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from datascope.importance.common import SklearnModelAccuracy
from datascope.importance.shapley import ShapleyImportance, ImportanceMethod
from appraiser import Appraiser
from classifier import LogisticClassifier as Classifier
from classifier import XGBClassifier as Classifier

utility_pipeline = pipeline.make_pipeline(
Classifier()
Expand Down
2 changes: 1 addition & 1 deletion app/baselines/debugging.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
from sklearn.model_selection import train_test_split
from classifier import LogisticClassifier as Classifier
from classifier import XGBClassifier as Classifier
from appraiser import Appraiser

class CustomAppraiser(Appraiser):
Expand Down
1 change: 1 addition & 0 deletions app/baselines/influence_function.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import torch
from appraiser import Appraiser
# we use LogisticClassifier here as a proxy
from classifier import LogisticClassifier as Classifier
from baselines.ptif.calc_influence_function import calc_img_wise
from torch.utils.data import TensorDataset, DataLoader
Expand Down
1 change: 0 additions & 1 deletion app/baselines/random_pick.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import numpy as np
from sklearn.model_selection import train_test_split
from appraiser import Appraiser

class RandomAppraiser(Appraiser):
Expand Down
3 changes: 0 additions & 3 deletions app/classifier.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
from loguru import logger
import numpy as np
from pyarrow import parquet as pq
import sklearn
import torch
import xgboost
import torch.nn as nn
from torch.utils.data import TensorDataset, DataLoader
from sklearn.linear_model import LogisticRegressionCV


class XGBClassifier():
def __init__(self):
Expand Down
2 changes: 0 additions & 2 deletions app/plotter_overall.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ def aggregate_data(evaluation_file, result_folder):
return data

def plot(data, result_folder, score_metric='auc'):
data = data[data['method']!='my_debug']

sns.set(
font="DejaVu Sans",
context="paper",
Expand Down
2 changes: 1 addition & 1 deletion app/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
import pyarrow as pa
from sklearn import metrics
from loguru import logger

def fix(proposed_fixes, train, budget, gt_df):
if len(proposed_fixes) > budget:
raise ValueError("Submission takes more budget than expected, {}>{}".format(len(proposed_fixes), budget))
Expand Down

0 comments on commit 8449382

Please sign in to comment.