SkillAgentSearch skills...

Dslighting

πŸ”₯πŸ”₯πŸ”₯ DSLighting is an LLM-driven autonomous data science execution engine that turns task descriptions and datasets into iterative code generation, execution, evaluation, and refinement workflows.

Install / Use

/learn @usail-hkust/Dslighting
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<div align="center"> <img src="https://raw.githubusercontent.com/usail-hkust/dslighting/main/assets/dslighting.png" alt="DSLIGHTING Logo" width="180" style="border-radius: 15px;">

DSLIGHTING: Data Science Framework

Python PyPI PyPI - Downloads FastAPI React Next.js License

<p align="center"> <a href="#quick-start-simplified-api"><img src="https://img.shields.io/badge/%F0%9F%9A%80-Quick_Start-green?style=for-the-badge" alt="Quick Start"></a> &nbsp;&nbsp; <a href="#what-dslighting-is"><img src="https://img.shields.io/badge/%E2%9A%A1-Features-blue?style=for-the-badge" alt="Core Features"></a> &nbsp;&nbsp; <a href="https://luckyfan-cs.github.io/dslighting-web/"><img src="https://img.shields.io/badge/%F0%9D%93%9A-Docs-orange?style=for-the-badge" alt="Documentation"></a> &nbsp;&nbsp; <a href="https://luckyfan-cs.github.io/dslighting-web/guide/getting-started.html"><img src="https://img.shields.io/badge/%F0%9D%93%96-User_Guide-purple?style=for-the-badge" alt="User Guide"></a> &nbsp;&nbsp; <a href="https://github.com/usail-hkust/dslighting/stargazers"><img src="https://img.shields.io/github/stars/usail-hkust/dslighting?style=for-the-badge" alt="Stars"></a> &nbsp;&nbsp; <img src="https://komarev.com/ghpvc/?username=usail-hkust&repo=dslighting&style=for-the-badge" alt="Profile views"> </p>

δΈ­ζ–‡ Β· ζ—₯本θͺž Β· FranΓ§ais

</div> <div align="center">

🎯 Intelligent Agent Workflows Β β€’Β  πŸ“Š Interactive Data Visualization<br> πŸ€– Automated Code Generation Β β€’Β  πŸ“ˆ End-to-End Task Evaluation

⭐ Star us Β β€’Β  πŸ’¬ Discussions

</div>
<details> <summary><strong>News 2026.03</strong> Β· <a href="#benchmarks">Jump to Benchmarks</a></summary>

DSLighting now officially supports benchmark evaluation for DACode (EMNLP 2024), DABench (ICML 2024), MoSciBench (ICLR 2026), MLE-Bench, and ScienceAgentBench (ICLR 2025).

Run benchmark evaluations with just a few lines of code through DSBenchmark.

</details>

New in v2.7.9 (Current)

| Feature | Description | |---------|-------------| | Benchmark Mode | Officially supports DABench, DACode, MLEBench, MoSciBench, and ScienceAgentBench / ScienceBench benchmark families for agent evaluation | | DAG Mode | Enhanced Directed Acyclic Graph (DAG) runtime for workflow orchestration | | ~~Web UI~~ | Development is currently paused, and the Web UI is no longer supported in this repository |

What DSLighting Is

DSLighting is an LLM-driven data science execution framework. DSLighting is an LLM-driven autonomous data science execution engine that turns task descriptions and datasets into iterative code generation, execution, evaluation, and refinement workflows. It supports:

  • task-oriented agent execution (run_agent, Agent)
  • benchmark evaluation (DSBenchmark)
  • architecture-level customization (services/operators/workflows)

The current public API is split into two layers:

  • dslighting.api: simplified, stable user API
  • dslighting.arch.*: advanced architecture API for custom agent development

Two Usage Modes

  1. Simplified API (recommended for quick start)
    For rapid prototyping and standard data science tasks.

  2. Architecture (recommended for deep customization)
    For advanced users building custom operators, workflows, and factories.


Installation

git clone https://github.com/usail-hkust/dslighting.git
cd dslighting

python3.10 -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

pip install -r requirements.txt  # Core runtime dependencies
pip install -e .
# Optional: full development/research dependency set
# pip install -r requirements_local.txt

If you hit ModuleNotFoundError: aiofiles, run:

pip install aiofiles

Environment Setup

Minimal .env:

API_KEY=your_key
API_BASE=https://api.openai.com/v1
LLM_MODEL=gpt-4o

Optional model-specific overrides (LLM_MODEL_CONFIGS):

{
  "openai/deepseek-ai/DeepSeek-V3.1-Terminus": {
    "api_key": ["key1", "key2"],
    "api_base": "https://api.siliconflow.cn/v1",
    "temperature": 1.0
  }
}

config.yaml (Optional)

config.yaml is optional for normal run_agent / Agent usage.

  • You can run most tasks without it.
  • It is mainly used by benchmark/runtime configuration and custom model pricing metadata.
  • Task registries still use per-task data_dir/<task_id>/config.yaml (separate from root config).

Minimal example (config.yaml):

run:
  enable_trajectory_logging: false
  trajectory_filename: trajectory.jsonl

llm_pricing:
  custom_models: {}

Sandbox Backends (Simplified API)

run_agent and Agent support:

  • local
  • e2b
  • ds_sandbox

Use explicit dotenv loading in your script:

from dotenv import load_dotenv
load_dotenv()

.env example

SANDBOX_BACKEND=local
SANDBOX_BACKEND_TYPE=docker
SANDBOX_TIMEOUT=21600
E2B_API_KEY=
SANDBOX_WORKSPACE_BASE=/tmp/ds_sandbox_workspaces
SANDBOX_PAUSED_BASE=/tmp/ds_sandbox_paused

Local sandbox

result = run_agent(
    task_id="bike-sharing-demand",
    sandbox_backend="local",
)

E2B sandbox

result = run_agent(
    task_id="bike-sharing-demand",
    sandbox_backend="e2b",
    sandbox_api_key=None,  # read from E2B_API_KEY by default
)

Notes:

  • install SDK: pip install e2b
  • set E2B_API_KEY in .env (or pass sandbox_api_key)

DS-Sandbox

result = run_agent(
    task_id="bike-sharing-demand",
    sandbox_backend="ds_sandbox",
    sandbox_backend_type="local",  # or "docker"
)

Notes:

  • install package: pip install ds-sandbox
  • defaults use writable paths under /tmp to avoid /opt permission issues

Quick Start (Simplified API)

One-liner execution

from dotenv import load_dotenv
load_dotenv()

from dslighting.api import run_agent

result = run_agent(
    task_id="bike-sharing-demand",
    workflow="aide",   # optional
    model="gpt-4o",    # optional
)

print(result.success, result.score, result.cost)
print(result.duration, result.output, result.error)

Use Agent directly

from dotenv import load_dotenv
load_dotenv()

from dslighting.api import Agent

agent = Agent(
    workflow="aide",
    model="gpt-4o",
    max_iterations=5,
)

result = agent.run(task_id="bike-sharing-demand")
print(result)

Architecture Mode (Custom Agent Development)

Use this when you need custom operators/workflows/factories.

What each part does:

  • Operator: one async capability unit (for example, summarize, plan, execute).
  • Workflow.solve(...): core async logic of your agent.
  • WorkflowFactory.create_agent(...): wires services + operators into a workflow instance.
  • workflow.run(...): sync wrapper around solve(...) for non-async users.
from pathlib import Path
from typing import Any

from dslighting.arch.interfaces import WorkflowFactoryInterface
from dslighting.arch.operators import Operator
from dslighting.arch.services import LLMService, SandboxService, WorkspaceService
from dslighting.arch.state import JournalState
from dslighting.arch.workflows import BaseWorkflow, BaseWorkflowFactory
from dslighting.config import LLMConfig


class SummarizeOperator(Operator):
    async def __call__(self, text: str) -> dict[str, Any]:
        return {"summary": text[:200]}


class MyWorkflow(BaseWorkflow):
    def __init__(self, operators, services, agent_config=None):
        super().__init__(
            operators=operators,
            services=services,
            agent_config=agent_config or {},
        )

    async def solve(
        self,
        description: str,
        io_instructions: str,
        data_dir: Path,
        output_path: Path,
    ) -> dict[str, Any]:
        return await self.operators["summarize"](text=description)


class MyWorkflowFactory(BaseWorkflowFactory, WorkflowFactoryInterface):
    def create_agent(self, **kwargs):
        workspace = WorkspaceService(run_name="custom_arch_run")
        services = {
            "llm": LLMService(config=LLMConfig(model=self.model)),
            "sandbox": SandboxService(workspace=workspace),
            "workspace": workspace,
            "state": JournalState(),
        }
        operators = {
            "summarize": SummarizeOperator(),
        }
        return MyWorkflow(operators=operators, services=services, agent_config=kwargs)


# Recommended for normal scripts: sync call via workflow.run(...)
def main():
    workflow = MyWorkflowFactory(model="gpt-4o").create_agent(max_iterations=3)
    result = workflow.run(data="data/competitions/bike-sharing-demand")
    print(result)

if __name__ == "__main__":
    main()

For most users (no custom workfl

Related Skills

View on GitHub
GitHub Stars46
CategoryDevelopment
Updated1h ago
Forks1

Languages

Python

Security Score

75/100

Audited on Mar 30, 2026

No findings