Skip to content

Commit 9ebc261

Browse files
committed
ratios.pkl loading condition fix #80
1 parent 847a51e commit 9ebc261

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,8 @@ def run(fpred, output, fteamsvecs, fsplits, np_ratio, algorithm='det_cons', k_ma
336336
print('Loading popularity labels ...')
337337
with open(f'{output}stats.pkl', 'rb') as f: stats = pickle.load(f)
338338
labels = pd.read_csv(f'{output}{att}.csv')[att].to_list()
339-
with open(f'ratios.pkl', 'rb') as f: ratios = pickle.load(f)
339+
if eq_op:
340+
with open(f'ratios.pkl', 'rb') as f: ratios = pickle.load(f)
340341
except (FileNotFoundError, EOFError):
341342
print(f'Loading popularity labels failed! Generating popularity labels at {output}stats.pkl ...')
342343
stats, labels, ratios = Reranking.get_stats(teamsvecs, coefficient=1, output=output, eq_op=eq_op, att=att)

0 commit comments

Comments
 (0)