Repository navigation
Sloop v0.2.1
This release introduces multithreaded dialog generation for significantly faster dataset creation, along with improved error handling and a refined logging system.
🚀 New Features
Multithreaded Dialog Generation
- [cite_start]Concurrent Execution: Added the
--concurrency(alias-j) parameter to the CLI, allowing parallel generation of multiple dialog chains. - Quantity-Guaranteed Loop: Implemented a robust generation loop using the
wait(..., return_when=FIRST_COMPLETED)pattern. [cite_start]If a generation task fails (e.g., due to API errors), a replacement task is automatically spawned to ensure the requested count is exactly met. - [cite_start]Thread-Safe Sampling: Implemented global thread locks (
threading.Lock) for the graph sampling engine to ensure diverse starting nodes are selected without race conditions during parallel execution.
🛡️ Stability & Improvements
Smart Error Handling
- Context Window Fallback: Added a smart retry mechanism for
litellm.ContextWindowExceededError. [cite_start]If a prompt exceeds the token limit, the engine automatically retries the generation with a reducedrag_top_kvalue (halving the number of RAG examples). - [cite_start]Hallucination Prevention: hardened agent prompts (specifically in
assistant_decideandselectortemplates) with strict prohibitions against inventing tools or parameters not defined in the schema.
Logging & Developer Experience
- Separated Logging Streams:
- [cite_start]Console: Now uses
tqdm_sinkto display onlyWARNINGandERRORlogs, ensuring the progress bar remains clean and visual artifacts are minimized. - [cite_start]File Log: Detailed
DEBUGandINFOlogs are written tologs/sloop.log, now including thread names to assist in debugging concurrent processes.
- [cite_start]Console: Now uses
- [cite_start]Reduced Noise: Suppressed verbose debug output from
LiteLLMto keep the console output focused.
⚡ Usage
Generate 100 dialogs using 4 concurrent threads:
sloop generate --count 100 --concurrency 4