dspy-async-training

Community

Optimize DSPy training for async services with ease.

Authorhung-phan
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill addresses the challenge of optimizing DSPy training modules to work seamlessly with asynchronous services, eliminating 'RuntimeError: no running event loop' errors during optimization.

Core Features & Use Cases

  • Async Training Infrastructure: Introduces a background event loop and context var propagation for async services during DSPy training.
  • Patch Dspy Parallelizer: Modifies the parallelizer to use context var propagation and ensure thread-safe context handling.
  • TrainingScript Pattern: Provides a clear pattern for using async training in a script, ensuring proper patching and context management.
  • Use Case: For instance, when training a DSPy module that requires async service access, such as Milvus or Redis, this skill will prevent runtime errors related to event loops.

Quick Start

Use the 'dspy-async-training' skill before compiling your DSPy module to ensure async services are supported.

Dependency Matrix

Required Modules

None required

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: dspy-async-training
Download link: https://github.com/hung-phan/ml-skills/archive/main.zip#dspy-async-training

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 620,000+ vetted skills library on demand.