85742ab165
Deploy Documentation / deploy (push) Has been cancelled
CPU Test / Test (Utilities, legacy, Python 3.10) (push) Has been cancelled
CPU Test / Test (LLM proxy, stable, Python 3.11) (push) Has been cancelled
CPU Test / Test (Others, stable, Python 3.11) (push) Has been cancelled
CPU Test / Test (Store, stable, Python 3.11) (push) Has been cancelled
CPU Test / Test (Utilities, stable, Python 3.11) (push) Has been cancelled
CPU Test / Test (Weave, stable, Python 3.11) (push) Has been cancelled
CPU Test / Test (AgentOps, stable, Python 3.12) (push) Has been cancelled
CPU Test / Test (LLM proxy, stable, Python 3.12) (push) Has been cancelled
CPU Test / Test (Others, stable, Python 3.12) (push) Has been cancelled
CPU Test / Test (Weave, latest, Python 3.13) (push) Has been cancelled
Dashboard / Chromatic (push) Has been cancelled
CPU Test / Lint - fast (push) Has been cancelled
CPU Test / Lint - next (push) Has been cancelled
CPU Test / Lint - slow (push) Has been cancelled
CPU Test / Lint - JavaScript (push) Has been cancelled
CPU Test / Build documentation (push) Has been cancelled
CPU Test / Test (AgentOps, legacy, Python 3.10) (push) Has been cancelled
CPU Test / Test (LLM proxy, legacy, Python 3.10) (push) Has been cancelled
CPU Test / Test (Others, legacy, Python 3.10) (push) Has been cancelled
CPU Test / Test (Store, legacy, Python 3.10) (push) Has been cancelled
CPU Test / Test (Weave, legacy, Python 3.10) (push) Has been cancelled
CPU Test / Test (AgentOps, stable, Python 3.11) (push) Has been cancelled
CPU Test / Test (Store, stable, Python 3.12) (push) Has been cancelled
CPU Test / Test (Utilities, stable, Python 3.12) (push) Has been cancelled
CPU Test / Test (Weave, stable, Python 3.12) (push) Has been cancelled
CPU Test / Test (AgentOps, latest, Python 3.13) (push) Has been cancelled
CPU Test / Test (LLM proxy, latest, Python 3.13) (push) Has been cancelled
CPU Test / Test (Others, latest, Python 3.13) (push) Has been cancelled
CPU Test / Test (Store, latest, Python 3.13) (push) Has been cancelled
CPU Test / Test (Utilities, latest, Python 3.13) (push) Has been cancelled
CPU Test / Test (JavaScript) (push) Has been cancelled
40 lines
1.0 KiB
Python
40 lines
1.0 KiB
Python
# Copyright (c) Microsoft. All rights reserved.
|
|
|
|
"""This script is the debugging script for the legacy Calc-X agent (v0.1)."""
|
|
|
|
import os
|
|
|
|
from legacy_calc_agent import LegacyCalcAgent
|
|
|
|
from agentlightning import LLM, DevTaskLoader, Trainer
|
|
|
|
|
|
def dev_task_loader() -> DevTaskLoader:
|
|
return DevTaskLoader(
|
|
tasks=[
|
|
{
|
|
"question": "What is 2 + 2?",
|
|
"result": "4",
|
|
},
|
|
{
|
|
"question": "What is 3 * 5?",
|
|
"result": "15",
|
|
},
|
|
{
|
|
"question": "What is the square root of 16?",
|
|
"result": "4",
|
|
},
|
|
],
|
|
resources={
|
|
"main_llm": LLM(
|
|
endpoint=os.environ["OPENAI_BASE_URL"], model="gpt-4.1-nano", sampling_parameters={"temperature": 0.7}
|
|
),
|
|
},
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
Trainer(n_workers=1, dev=True, max_tasks=2).fit_v0(
|
|
LegacyCalcAgent(), "http://localhost:9999/", dev_data=dev_task_loader()
|
|
)
|