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

Do not crash if there are invalid model configs in the DB #6593

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

RyanJDick
Copy link
Collaborator

Summary

This PR changes the handling of invalid model configs in the DB to log a warning rather than crashing the app.

This change is being made in preparation for some upcoming new model additions. Previously, if a user rolled back from an app version that added a new model type, the app would not launch until the DB was fixed. This PR changes this behaviour to allow rollbacks of this type (with warnings).

Keep in mind that this change is only helpful to users rolling back to a version that has this fix. I.e. it offers no help in the first version that includes it.

QA Instructions

  1. Run the Spandrel model branch, which adds a new model type Add support for Spandrel Image-to-Image models (e.g. ESRGAN, Real-ESRGAN, Swin-IR, DAT, etc.) #6556.
  2. Add a spandrel model via the model manager.
  3. Rollback to main. The app will crash on launch due to the invalid spandrel model config.
  4. Checkout this branch. The app should now run with warnings about the invalid model config.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)

@github-actions github-actions bot added api python PRs that change python files services PRs that change app services python-tests PRs that change python tests docs PRs that change docs labels Jul 10, 2024
@RyanJDick RyanJDick force-pushed the ryan/do-not-crash-on-invalid-model-config branch from 70671ed to 69af099 Compare July 12, 2024 01:05
@RyanJDick RyanJDick enabled auto-merge July 12, 2024 01:06
@RyanJDick RyanJDick merged commit 2320701 into main Jul 12, 2024
14 checks passed
@RyanJDick RyanJDick deleted the ryan/do-not-crash-on-invalid-model-config branch July 12, 2024 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api docs PRs that change docs python PRs that change python files python-tests PRs that change python tests services PRs that change app services
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants