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

[air][example] Dreambooth fine-tuning example fixes #37504

Merged

Conversation

justinvyu
Copy link
Contributor

Why are these changes needed?

This examples makes a few improvements on the dreambooth fine-tuning example:

  • Fixes a bug with the batching logic (batch size > 1 used to be buggy). See below for some samples before/after the fix, training with batch size = 2.
Before fix (this is some random dog) After fix (this is the subject dog)
0-b56eda34b78457234bae6441d64c62a5e055f1af 2-99ebff315700154abfb5a8eec1f37dd9f3d71e25
  • Simplifies the data preprocessing logic (the "image" vs "image_1" columns from a zipped dataset was confusing before)
  • Switches to the dog dataset, and fixes the lego car dataset class to just car (from @woshiyyya's experiments)
  • Updates the doc guide a bit, so that it can be linked in an upcoming workspace template. (The template will only provide some basic instructions on how to run.)

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Justin Yu <[email protected]>
Copy link
Member

@woshiyyya woshiyyya left a comment

Choose a reason for hiding this comment

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

Thank you Justin! LGTM. Added a few comments.

Maybe in workspace template, we can also add this online inference notebook to let user play with their model interactively with customized prompts. https://github.com/woshiyyya/dreambooth-demo/blob/master/serve.ipynb

python/ray/air/examples/dreambooth/dataset.py Show resolved Hide resolved
python/ray/air/examples/dreambooth/run_model.py Outdated Show resolved Hide resolved
python/ray/air/examples/dreambooth/run_model.py Outdated Show resolved Hide resolved
python/ray/air/examples/dreambooth/train.py Show resolved Hide resolved
python/ray/air/examples/dreambooth/dataset.py Show resolved Hide resolved
python/ray/air/examples/dreambooth/run_model.py Outdated Show resolved Hide resolved
@justinvyu justinvyu requested a review from woshiyyya July 24, 2023 20:12
@justinvyu
Copy link
Contributor Author

@matthewdeng matthewdeng merged commit 6ac4521 into ray-project:master Jul 24, 2023
2 checks passed
ollie-iterators added a commit to ollie-iterators/ray that referenced this pull request Jul 24, 2023
@justinvyu justinvyu deleted the air/examples/dreambooth_batch_fix branch July 27, 2023 05:42
justinvyu added a commit to justinvyu/ray that referenced this pull request Jul 31, 2023
NripeshN pushed a commit to NripeshN/ray that referenced this pull request Aug 15, 2023
harborn pushed a commit to harborn/ray that referenced this pull request Aug 17, 2023
harborn pushed a commit to harborn/ray that referenced this pull request Aug 17, 2023
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
vymao pushed a commit to vymao/ray that referenced this pull request Oct 11, 2023
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.

3 participants