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

Add --no_balance flag to not balance datasets #287

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
Prev Previous commit
Next Next commit
add check for 0 val examples
  • Loading branch information
AlexTMallen committed Aug 22, 2023
commit 1ed44eff7a9b6a8f59cf640a53a99a46f1465762
3 changes: 3 additions & 0 deletions elk/debug_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ def save_debug_log(datasets: list[DatasetDictWithName], out_dir: Path) -> None:
else:
train_split, val_split = select_train_val_splits(ds)

if len(ds[val_split]) == 0:
logging.warning(f"Val split '{val_split}' is empty!")
continue
text_questions = ds[val_split][0]["text_questions"]
template_ids = ds[val_split][0]["variant_ids"]
label = ds[val_split][0]["label"]
Expand Down