1
0

print debugging

This commit is contained in:
Nathan TeBlunthuis 2025-01-12 09:44:25 -08:00
parent 31aaa03079
commit a7182ff3dc

View File

@ -126,8 +126,11 @@ def cosine_similarities_weekly(tfidf_path, outfile, term_colname, included_subre
return outfile.exists() return outfile.exists()
if not overwrite: if not overwrite:
print("not overwriting")
weeks = [week for week in weeks if not output_exists(week)] weeks = [week for week in weeks if not output_exists(week)]
print(weeks, flush=True)
if clusters is not None: if clusters is not None:
clusters_raw = pd.read_feather(clusters) clusters_raw = pd.read_feather(clusters)
clusters = duckdb.sql("SELECT A.subreddit AS sr_i, B.subreddit AS sr_j FROM clusters_raw AS A JOIN clusters_raw AS B ON A.cluster == B.cluster WHERE A.cluster != -1 AND B.cluster != -1").df() clusters = duckdb.sql("SELECT A.subreddit AS sr_i, B.subreddit AS sr_j FROM clusters_raw AS A JOIN clusters_raw AS B ON A.cluster == B.cluster WHERE A.cluster != -1 AND B.cluster != -1").df()