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

Point to composer.callback.Generate #631

Merged
merged 21 commits into from
Oct 12, 2023
Merged

Point to composer.callback.Generate #631

merged 21 commits into from
Oct 12, 2023

Conversation

aspfohl
Copy link
Contributor

@aspfohl aspfohl commented Sep 27, 2023

This removes the llm-foundry Generate callback in favor of composer.callback.Generate, which has newer features like logging to MLflow. I've deleted the existing Generate callback logic but kept it around just in case someone is directly importing from llm-foundry. The builder callback also supports converting batch_log_interval to interval for backwards compatibility

In a future llmfoundry release, should remove this callback entirely

example of logging to mlflow & wandb
Screenshot 2023-09-29 at 10 20 22 AM
Screenshot 2023-09-29 at 10 20 28 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.

Can you please manually test this? both with old args and new args. Also I know there isn't a unit test for this callback right now...but could you please add one?

llmfoundry/utils/builders.py Outdated Show resolved Hide resolved
@aspfohl
Copy link
Contributor Author

aspfohl commented Sep 27, 2023

Can you please manually test this? both with old args and new args. Also I know there isn't a unit test for this callback right now...but could you please add one?

Yep, will do! Planning to test with https://github.com/mosaicml/mcloud/pull/2529, and I'll add some unit tests too

Although since the Generate callback should now be in composer, not sure it makes sense to add tests here?

@irenedea
Copy link
Contributor

irenedea commented Sep 28, 2023

Although since the Generate callback should now be in composer, not sure it makes sense to add tests here?

There are unit tests for Generate in composer that test for functionality. Is there something else we should be unit testing in foundry for this callback? I think the builder tests that are in this PR may be sufficient. cc: @dakinggg

@dakinggg
Copy link
Collaborator

@irenedea @aspfohl the "new" thing that foundry should test is that the callback works e2e with MPT

llmfoundry/callbacks/__init__.py Outdated Show resolved Hide resolved
llmfoundry/callbacks/generate_callback.py Outdated Show resolved Hide resolved
tests/test_builders.py Show resolved Hide resolved
tests/test_hf_mpt_gen.py Outdated Show resolved Hide resolved
@aspfohl aspfohl requested a review from dakinggg October 11, 2023 16:49
llmfoundry/callbacks/generate_callback.py Outdated Show resolved Hide resolved
tests/test_hf_mpt_gen.py Outdated Show resolved Hide resolved
tests/test_hf_mpt_gen.py Outdated Show resolved Hide resolved
tests/test_hf_mpt_gen.py Outdated Show resolved Hide resolved
tests/test_hf_mpt_gen.py Outdated Show resolved Hide resolved
tests/test_hf_mpt_gen.py Outdated Show resolved Hide resolved
tests/test_hf_mpt_gen.py Outdated Show resolved Hide resolved
tests/test_hf_mpt_gen.py Outdated Show resolved Hide resolved
tests/test_hf_mpt_gen.py Outdated Show resolved Hide resolved
tests/test_hf_mpt_gen.py Outdated Show resolved Hide resolved
tests/test_hf_mpt_gen.py Show resolved Hide resolved
@aspfohl aspfohl merged commit db2233e into main Oct 12, 2023
12 checks passed
@aspfohl aspfohl deleted the anna/generate branch October 12, 2023 00:32
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

5 participants