Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set output-ngrams to default to true and update README #1776

Merged
merged 5 commits into from
Aug 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 2 additions & 1 deletion scripts/data_overlap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ This needs to be run from the data overlap directory; i.e. cd scripts/data_overl

Usage:

python [compute_data_overlap_metrics.py OR run_data_overlap_beam.py] --input-data <input_data> --scenario-data <scenario_data> --output-stats <output_stats> --input-format <input_format>
python [compute_data_overlap_metrics.py OR run_data_overlap_beam.py] --input-data <input_data> --scenario-data <scenario_data> --output-stats <output_stats> --input-format <input_format> --output-ngrams <True/False>

For instance, you can call this with The Pile, e.g. have:
input_data = 00.jsonl (download https://pile.eleuther.ai/)
scenario_data = (example included with repo, but can use HELM to generate)
output_stats = arbitrary output file name, e.g. "output_stats"
input_format = the_pile
output_ngrams = output the ngrams that are overlapping in test set to a separate "{output_stats}_ngrams" file


There are additional optional args:
Expand Down
2 changes: 1 addition & 1 deletion scripts/data_overlap/common/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def get_data_overlap_args() -> Any:
required=True,
help="The format of your input file for your training data, e.g. raw, custom, the_pile",
)
parser.add_argument("--output-ngrams", type=bool, default=False, help="Whether to output ngrams")
parser.add_argument("--output-ngrams", type=bool, default=True, help="Whether to output ngrams")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you set the default to True, there's no way to turn it off, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catch, I've updated it to be --no-output-ngrams which can be passed to not output ngrams.

parser.add_argument(
"--tags",
type=str,
Expand Down
Loading