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

Multi eval dataset logging #603

Merged
merged 10 commits into from
Sep 27, 2023
Merged

Multi eval dataset logging #603

merged 10 commits into from
Sep 27, 2023

Conversation

snarayan21
Copy link
Contributor

@snarayan21 snarayan21 commented Sep 16, 2023

Previously, only one eval dataloader was supported in llm-foundry (although multiple ICL eval tasks and the gauntlet were supported). Now users can add custom eval datasets by turning eval_dataloader into a list of dataloaders in their yaml. It would look like this:

Before:

eval_loader:
  name: text
  dataset: ...
  drop_last: false
  num_workers: 8

After:

eval_loader:
- label: first
  name: text
  dataset: ...
  drop_last: false
  num_workers: 8
- label: second
  name: text
  dataset: ...
  drop_last: false
  num_workers: 8

Users must specify a label for each eval dataloader so that these metrics are logged separately. This functionality was tested on wandb, mlflow, and tensorboard, shown below.

wandb:
Screenshot 2023-09-16 at 10 07 02 AM

mlflow:
Screenshot 2023-09-16 at 10 06 48 AM

tensorboard:
Screenshot 2023-09-16 at 10 29 53 AM

Copy link
Collaborator

@dakinggg dakinggg left a comment

Choose a reason for hiding this comment

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

Implementation looks good, thanks! Please remove the accidentally committed files, and add a simple unit test.

scripts/train/train.py Outdated Show resolved Hide resolved
scripts/train/train.py Outdated Show resolved Hide resolved
scripts/train/train.py Outdated Show resolved Hide resolved
Copy link
Contributor

@irenedea irenedea left a comment

Choose a reason for hiding this comment

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

LGTM with some minor comments

scripts/train/train.py Outdated Show resolved Hide resolved
scripts/train/train.py Outdated Show resolved Hide resolved
scripts/train/train.py Show resolved Hide resolved
tests/test_train_inputs.py Outdated Show resolved Hide resolved
tests/test_training.py Outdated Show resolved Hide resolved
Copy link
Contributor

@irenedea irenedea left a comment

Choose a reason for hiding this comment

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

Can we add a unit test that tests two eval loaders with two different datasets?

tests/test_training.py Outdated Show resolved Hide resolved
tests/test_data_prep_scripts.py Show resolved Hide resolved
Copy link
Contributor

@irenedea irenedea left a comment

Choose a reason for hiding this comment

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

LGTM! Just a minor comment about using tmp_path instead

@snarayan21 snarayan21 enabled auto-merge (squash) September 27, 2023 20:52
@snarayan21 snarayan21 merged commit 3d4fa0f into main Sep 27, 2023
9 checks passed
@dakinggg dakinggg deleted the multi-eval-dataset-logging branch October 11, 2023 21:30
@dakinggg dakinggg mentioned this pull request Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants