File tree 2 files changed +353
-4
lines changed
2 files changed +353
-4
lines changed Original file line number Diff line number Diff line change @@ -62,17 +62,22 @@ def filter_miners(self) -> List[int]:
62
62
63
63
ROOT_DIR = Path (__file__ ).resolve ().parents [1 ]
64
64
65
- with open (os .path .join (ROOT_DIR , "blacklist.txt" , "r" ) ) as f :
65
+ with open (os .path .join (ROOT_DIR , "blacklist.txt" ), 'r' ) as f :
66
66
blacklist = f .read ()
67
67
68
68
blacklist : List [str ] = blacklist .split ()
69
+
70
+ logger .warning (f"Blacklist on the following coldkeys: { blacklist } " )
69
71
malicious_uids = np .where (np .isin (self .metagraph .coldkeys , blacklist ))[0 ]
70
72
71
73
# Remove the malicious uids from the list of all miner uids
72
74
logger .warning (f"Removing { len (malicious_uids )} malicious uids from the list of all miner uids." )
73
75
mask = ~ np .isin (self .all_miner_uids , malicious_uids )
74
76
75
- return self .all_miner_uids [mask ]
77
+ all_miner_uids = list (np .array (self .all_miner_uids )[mask ])
78
+ logger .info (f"Initial number of uids: { len (self .all_miner_uids )} . After filter: { len (all_miner_uids )} " )
79
+
80
+ return all_miner_uids
76
81
77
82
def parse_mdrun_args (self ) -> str :
78
83
mdrun_args = ""
You can’t perform that action at this time.
0 commit comments