You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: UUID-based cycle generation with bug fixes and UX improvements (#595)
* feat: UUID-based cycle generation with improved TUI and checkpoint v4
Refactor dataset generation to use UUID-based tracking with cycle-based
topic assignment, fixing an issue where topic cycling exited early
without generating the expected number of samples. Adds simple/headless
TUI mode with progress bars, dynamic Cycle/Step labels, and section
headings for topic and dataset generation phases. Bumps checkpoint
format to v4 for (uuid, cycle) tuple tracking. Includes prompt timeout
for checkpoint resume, improved failure counting after checkpoint clear,
and updated docs and tests.
* fix: TUI improvements and minor cleanups
Add section headings for Topic Generation and Dataset Generation in
simple TUI mode. Fix floating bullet on checkpoint status empty line.
Clarify cloud upload prompt to specify graph and dataset. Remove
redundant help text from --cloud-upload option. Sync uv.lock with
version bump and transformers 5.0.0.
* fix: restore full topic path context in cycle-based generation
Cycle-based generation was only passing the leaf topic text to
build_prompt(), losing the hierarchical path context that step-based
generation preserves. Now uses topic_model.get_path_by_id() to recover
the full root-to-leaf path before building prompts. Also documents
this requirement in CLAUDE.md to prevent future regressions.
* fix: remove duplicate stop_requested initialization in generator
* fix: replace missing _refresh_left call in DatasetGenerationTUI
on_llm_retry() called _refresh_left() which only exists on
TopicGenerationTUI. Replace with inline events panel update
matching the pattern used by log_event() in the same class.
Add unit test to prevent regression.
* fix: remove duplicate generation_stopped event handler in dataset_manager
The second elif handler for "generation_stopped" was unreachable dead
code (duplicate condition). It also lacked simple_progress cleanup
that the first handler correctly includes.
* fix: add Windows fallback for _prompt_with_timeout
select.select on sys.stdin raises OSError on Windows. Fall back to
click.prompt (blocking, no countdown) when platform is Windows.
* fix: exclude root node from graph get_unique_topics
The root node contains the generation seed prompt, not a topic for
sample generation. Its UUID was being included in cycle-based
generation, causing samples to be generated from the raw prompt text.
* fix: target retry logic to specific failed (uuid, cycle) tuples
Previously, when a UUID failed on one cycle, all (uuid, cycle) tuples
were removed from the completed set — including cycles that succeeded.
This caused unnecessary re-generation of already-completed work.
Now failure records include the cycle number, and retry logic removes
only the specific (uuid, cycle) that failed. Includes a legacy
fallback for checkpoint files created before this change.
* chore: remove internal PLAN files and warn on checkpoint interval adjustment
Remove PLAN-generation-refactor.md and PLAN-remaining-work.md which
are internal working documents that should not ship with the codebase.
Add logger.warning when checkpoint_interval is silently bumped to
match concurrency/batch_size, so users understand the adjustment.
* fix: use config mode for topic file loading, warn on extension mismatch
Previously, a .json file extension would override the config mode and
force graph loading, even when mode was set to 'tree'. Now config mode
always takes precedence. A TUI warning is shown when the file extension
does not match the configured mode, guiding users to fix either the
extension or the --mode flag.
* fix: save partial results on Ctrl+C when checkpointing is not enabled
Previously, Ctrl+C without checkpointing showed a misleading
"Stopping after current checkpoint" message and discarded all
generated samples. Now the message is context-aware, and partial
results are saved to the output file when no checkpoint is configured.
* fix: address PR feedback - simplify input handling and add accounting fields
- Remove redundant empty-string check in _prompt_with_timeout (both
branches returned default)
- Add unaccounted field to cycle-based generation_complete event for
parity with step-based generation accounting
Copy file name to clipboardExpand all lines: CLAUDE.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,9 @@ The engine includes robust JSON parsing with regex extraction and retry logic fo
59
59
- Failed samples tracked separately from successful ones
60
60
- Comprehensive error reporting in final summary
61
61
62
+
### Topic Path Context in Generation
63
+
Dataset generation must always pass the **full hierarchical path** (root -> ... -> leaf) to `build_prompt()`, not just the leaf topic text. This applies to all generation modes (step-based and cycle-based). The full path provides essential context for the LLM to generate domain-specific samples. When modifying generation logic, verify that `subtopics_list` receives the complete path from `TopicModel.get_path_by_id()` or `TopicPath.path`, never just the leaf text in isolation.
64
+
62
65
### System Message Control
63
66
The `sys_msg` parameter controls whether system messages are included in the final dataset format - this affects training data structure.
0 commit comments