WebUI forced rescan clears the wrong VAE cache when the active config uses --keys
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
Research direction
Start with _get_global_config in routes/dataset_viewer.py and trace how its result reaches DatasetScanService._resolve_vae_cache_dir and clear_vae_cache in services/dataset_scan_service.py. Check how _build_scan_args and CacheJobService._resolve_global_key handle ---prefixed keys, then add a regression test for a ---keyed active config. Done when the configured VAE cache directory is resolved and cleared during a forced rescan.
Written by the indexing model from the issue text.
Description
Summary
A WebUI forced rescan clears the wrong VAE cache directory when the active training config uses CLI-style keys (--output_dir, --model_family). Saved configs commonly use those keys; see simpletuner/examples/_shared/default.json. The real cache is left in place, so latents from the old geometry outlive the rescan.
Checked on refactor/provider-transform-cache (931460c57).
Details
routes/dataset_viewer.py:77_get_global_config()returns the active config as stored, with--keys.DatasetScanService._build_scan_args(services/dataset_scan_service.py:177) strips the prefix, so the scan's own settings are right.DatasetScanService._resolve_vae_cache_dir(dataset_scan_service.py:228-249) readsglobal_config.get("output_dir")andglobal_config.get("model_family")by plain name. It is reached through_local_vae_clear_directory→clear_vae_cacheafter a forced rescan (dataset_scan_service.py:545).
Probe, with cache_dir_vae: "{output_dir}/cache/vae/{model_family}/{id}":
{"output_dir": "/runs/a", "model_family": "flux"} -> /runs/a/cache/vae/flux/train
{"--output_dir": "/runs/a", "--model_family": "flux"} -> <cwd>/.simpletuner_output/cache/vae/train
Proposed fix
Strip -- once, where the viewer reads the active config (_get_global_config), and remove the now-redundant per-call stripping:
_build_scan_args;- the dual lookup in
CacheJobService._resolve_global_key, if every caller goes through the stripped config.
Test: a ---keyed active config resolves the VAE cache directory to the configured path, and a forced rescan clears that directory.
Related commit on refactor/fable-5.2-datasets
- c421b0ca2: read the active config's CLI-style keys when the WebUI scans a dataset. It strips
--in_get_global_config, the same fix, but on a base where_build_scan_argsdidn't strip either.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 295
- Avg merge
- 3h 28m
- Merged PRs (30d)
- 42
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bghira/SimpleTuner
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bghira/SimpleTuner#3345 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 57/100
bghira/SimpleTuner#3346 ·
Maintainers usually reply within 1 day
-
Epoch checkpoints can't be resumed once the next epoch has recropped (provider-transform-cache)Openbug
Difficulty 5/5 Over a week Newbie friendliness 35/100
bghira/SimpleTuner#3343 ·
Maintainers usually reply within 1 day
-
Parquet captions: skip null or empty rows instead of refusing to start, and never train on "nan"Openbug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
bghira/SimpleTuner#3341 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
bghira/SimpleTuner#3340 ·
Maintainers usually reply within 1 day
All issues in bghira/SimpleTuner
Similar issues
-
documentation priority: low size: S status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
cubrid-lab/sqlalchemy-cubrid#1397 ·
Maintainers usually reply within 1 day
-
documentation priority: low size: S status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cubrid-lab/pycubrid#1307 ·
Maintainers usually reply within 1 day
-
[Bug]: Installer hides SSL certificate errors as bare URLError, and the suggested fix can't workOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
ShaftHQ/chaosengine-harness#143 ·
Maintainers usually reply within 1 day
-
LLMContextNode tool builders fail on nested params like `params:retrieval.max_matches`Possibly taken @Shizoqua claimed this today. OpenCommunity
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 2 days
-
security
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
btclib-org/portanode#985 ·
Maintainers usually reply within 1 day