Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pile/processing/dedup/grouped_dedup.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ def run(
threshold: float = typer.Option(0.7, help="Minhash threshold"),
output: str = typer.Option(None, help="Store the deduplicated dataset"),
):
global uf
OUTPUT_BASE = Path(output or "output")
OUTPUT_BASE.mkdir(exist_ok=True, parents=True)
output = OUTPUT_BASE / "deduplicated"
Expand All @@ -221,6 +220,7 @@ def run(
data = json.load(f)
in_common = data.pop("common_group")
for group_name in ["group_1", "group_2"]:
uf = UnionFind()
time_measures = {}
start_time = time.time()
B, R = optimal_param(threshold, num_perm)
Expand Down Expand Up @@ -343,5 +343,4 @@ def run(
logger.info("🤗 Happy Deduplicating 🤗")

mp.set_start_method("fork", force=True)
uf = UnionFind()
typer.run(run)