Datasets:

Modalities:
Tabular
Text
Formats:
parquet
Languages:
code
ArXiv:
Tags:
code
License:

Dedup granularity: are stack-v3-train repository rows complete, and do all files belong to the labeled repo?

#4
by iamgroot42 - opened

Thank you so much for the release! πŸ™Œ

The card says, under deduplication:

"For stack-v3-train, a single representative file per cluster is retained, chosen by (in order) highest stars, highest forks, permissive license, earliest repository creation."

I'm trying to understand how this interacts with the repository grouping, where each row is a full repository with code inline under files[].content

  1. When you say a representative file is kept per cluster, does "file" mean a single source file, or a whole repository? Since the MinHash clustering is described as language-agnostic and running across all repositories, I'm assuming it's individual files - can you confirm?
  2. Given file-level, cross-repo dedup, if I'm looking at a repository row in stack-v3-train:
  • (a) Is every row a complete copy of the repo, or can individual files be missing because their cluster's representative was retained under a different repository?
  • (b) Are all files in a row guaranteed to originate from that exact repo, or could a retained "representative" file actually be the copy from an earlier fork / another repository that happened to win its cluster (higher stars/forks/earlier creation)?

For context on (b): since forks with β‰₯5 stars were pulled in and representatives are selected by stars/forks/creation date, I want to be sure a row labeled owner/repo contains that repo's own files, and not representative copies inherited from a fork.

Hugging Face Code Research org

Thank you! The "winning" files stay with their respective repositories (no misattribution), and all the near-duplicates are removed. So essentially the filtered version has holes in place of duplicated files (not ideal for reading, but a fair tradeoff for training).

Sign up or log in to comment