Skip to content

Commit

Permalink
Remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddely committed Feb 27, 2023
1 parent 9d602fb commit c0b799f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/attack/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

from .targeted_attack import TargetedAttack
from .untargeted_attack import UntargetedAttack
from .anticipate_attack import AnticipateAttack
from .anticipate_tf_attack import AnticipateTfAttack
2 changes: 1 addition & 1 deletion src/attack/anticipate_tf_attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
logger = logging.getLogger(__name__)

# Move this into generate later
from src.torch_compat.anticipate import train_anticipate
# from src.torch_compat.anticipate import train_anticipate

class AnticipateTfAttack(LossBasedAttack):

Expand Down
3 changes: 1 addition & 2 deletions src/federated_averaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import numpy as np
import tensorflow as tf

from src.torch_compat.data_holder import DataHolder
# from src.torch_compat.data_holder import DataHolder

tf.get_logger().setLevel('DEBUG')

Expand Down Expand Up @@ -90,7 +90,6 @@ def __init__(self, config, models, config_path):
self.malicious_clients[malicious_indices] = True

self.global_dataset = self.build_dataset()
DataHolder.global_dataset = self.global_dataset
# self.malicious_clients[np.random.choice(self.num_clients, self.num_malicious_clients, replace=False)] = True
self.client_objs = []
self.client_model = None
Expand Down
2 changes: 1 addition & 1 deletion train_configs/basic/test_model_anticipate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ client:
attacker_full_dataset: false
model_type: "test_model"
anticipate_steps: 3
name: AnticipateAttack
name: AnticipateTfAttack
multi_attacker_scale_divide: true
model_name: test_model
dataset:
Expand Down

0 comments on commit c0b799f

Please sign in to comment.