Phase 2 - Input tooltips, autocorrect, synced run names, default names - #1300
Phase 2 - Input tooltips, autocorrect, synced run names, default names#1300O-J1 wants to merge 36 commits into
Conversation
…nts training if there are validation errors
…entry and dir_entry
for more information, see https://pre-commit.ci
…loat to be positive, delete dead code
…into input-validation
…nput-tooltips-and-co + minor NFKC full width char fix
…ainer into input-tooltips-and-co
|
@dxqb Would you be able to review this now? |
Co-authored-by: Copilot <copilot@github.com>
finally did |
Co-authored-by: Copilot <copilot@github.com>
|
Addressed review comments as best I could |
|
👀 |
|
@dxqb Merged updates and addressed some things + fixed the lokr regression. You stated this "I think there is an easier way. Will follow up" last month. Everything else has been resolved aside from the name discussion |
|
I'd like to ask that auto-correct doesn't kick in until the user clicks off the input box - currently if you are a really slow typer, or if you're remoting into your PC and adjusting the settings via a remote delay, you could be halfway through typing something and then autocorrect kicks you off. A better method considering UX is to only auto-correct after the user exits the input field. I'd also agree with dxqb - os.mkdir is a better solution than 'Actually, can you open your file explorer, find the destination folder that you want to use, right click, click 'Create New Folder', open it, copy that path, and then copy and paste it into this textbox?' Honestly I'm iffy in general on autocorrect at all - feels like fixing a problem that doesn't exist, I'm much more a fan of just... throw an exception. |
I dont ever want to have to deal with users being stupid in the common pitfall fields again if I can help it+ it helps people from different cultures (arabic, jp and eu) still use their specific decimal separators too. Ive already pared it back massively to only obvious things. |
|
@dxqb @BitcrushedHeart PathIOType.OUTPUT fields now mkdir |
| if self.peft_type == PeftType.OFT_2: | ||
| return | ||
|
|
||
| rank_key = next((k for k in state_dict if k.endswith(".lora_down.weight")), None) |
There was a problem hiding this comment.
I don't understand this new check. there already is a check below this new inserted code. it already finds the rank_key based on the peft type.
what does this do what the existing check doesn't also do? Please have a look at this code in context before you reply. on it's own, it might make sense, but not with the following section
| abs_path = os.path.abspath(trimmed) | ||
| output_dir = abs_path if output_is_dir else os.path.dirname(abs_path) | ||
| try: | ||
| os.makedirs(output_dir, exist_ok=True) |
There was a problem hiding this comment.
thanks, but validation.py shouldn't create directories as a side effect:
there is no need for this I think. all directories that need to be created, are already created elsewhere:
- workspace_dir: GenericTrainer.init (modules/trainer/GenericTrainer.py:74-75) — os.makedirs(os.path.join(config.workspace_dir, "tensorboard"), exist_ok=True), which recursively creates workspace_dir too.
- cache_dir: GenericTrainer.start() (modules/trainer/GenericTrainer.py:134) — os.makedirs(self.config.quantization.cache_dir, exist_ok=True) where quantization.cache_dir defaults to cache_dir + "/quantization".
- final_output_dir: created by the model savers right before writing (modules/modelSaver/mixin/LoRASaverMixin.py:51,67,75, EmbeddingSaverMixin.py:32).
- debug_dir: created via _save_image/_save_text in ModelSetupDebugMixin when a debug artifact is actually written.
| final_output_dir = parent if parent != "." else "./models" | ||
| else: | ||
| run_name = "" | ||
| final_output_dir = "./models" |
There was a problem hiding this comment.
minor but looks weird to me. why not just "models"?
| "Increase your total epochs to continue." | ||
| ) | ||
|
|
||
| def get_last_backup_path( |
There was a problem hiding this comment.
I don't think we should touch the backup-finding logic at all. Why should you even have incompatible backups in the same workspace? What problem does this solve?
If you disagree, please submit it as a separate PR. It is incredible difficult to review a PR that does so many completely unrelated things.
| last_backup_path = self.config.get_last_backup_path(require_compatible=True) | ||
| assert last_backup_path is not None | ||
|
|
||
| if self.config.training_method == TrainingMethod.LORA: |
There was a problem hiding this comment.
LOHA regression? if you mean this, I think that was a user error: #1340 (comment)
|
I made minor changes to be able to start it, but don't have write access to this branch. You'll find them here: O-J1#2 There are 2 unaddressed comments from an earlier review and I have added a few new ones.
|
When autocorrect is not turned on we surface a tooltip: