Skip to content

Confirm before clearing the cache on training start - #1660

Open
dxqb wants to merge 1 commit into
Nerogar:masterfrom
dxqb:confirm-clear-cache-squashed
Open

Confirm before clearing the cache on training start#1660
dxqb wants to merge 1 commit into
Nerogar:masterfrom
dxqb:confirm-clear-cache-squashed

Conversation

@dxqb

@dxqb dxqb commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

image

Test plan

  • pre-commit run --all-files passes
  • Launched the affected UI or script and exercised the change
  • Tested with at least one real preset / config when relevant (note which: ____)

AI assistance

  • AI-assisted — I have read every line in this diff and can defend each change

"Clear cache before training" is a sticky flag, so leaving it ticked from a
previous run silently deletes the cache directory contents when the next run
starts. Start Training now asks for confirmation first, and cancelling aborts
the start before the button switches to the training state.

The cache directory can be on a remote machine, so there is no way to check
whether a cache exists or to offer a separate "delete now" action. The prompt
is gated on latent caching as well, matching the condition under which
GenericTrainer.start actually clears the cache.

Adds a confirm(title, message) -> bool method to BaseTrainUIView, backed by
messagebox.askokcancel in the CustomTkinter view and QMessageBox.question in
the PySide6 view.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant