Skip to content

Commit

Permalink
ldb
Browse files Browse the repository at this point in the history
  • Loading branch information
femto committed Nov 12, 2024
1 parent dea94b0 commit 95abb33
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "LLMDebugger"]
path = LLMDebugger
url = https://github.com/FloridSleeves/LLMDebugger.git
1 change: 1 addition & 0 deletions LLMDebugger
Submodule LLMDebugger added at 49ac19
4 changes: 3 additions & 1 deletion examples/smart_minion/brain.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ async def smart_brain():
brain = Brain(
python_env=RpycPythonEnv(port=python_env_config.get("port", 3007)),
llm=llm,
#llms={"route": [ "llama3.2","llama3.1"]}
llms={"route": [ "llama3.2","llama3.1"]}
)
# obs, score, *_ = await brain.step(query="what's the solution for game of 24 for 4 3 9 8")
# print(obs)

# 从 HumanEval/88 提取的测试用例
test_data = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ async def main():
# 使用新的数据集运行评估
correct, count, matched_ids, mismatched_ids = await evaluate_dataset(
mismatched_data,
run_filename=f"run_human_eval_test_{model}4.json",
run_filename=f"run_human_eval_test3_{model}2.json",
continue_process=True,
concurrency_count=60
)
Expand Down
2 changes: 1 addition & 1 deletion examples/smart_minion/human_eval/human_eval_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "cot",
"count": 1,
"check": true,
"check": 3,
"post_processing": "extract_python"
}
],
Expand Down
36 changes: 32 additions & 4 deletions minion/main/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
from . import minion
from . import worker
from . import check_route
from . import check
from minion.main.worker import (
WorkerMinion,
NativeMinion,
CotMinion,
PythonMinion,
MathMinion,
PlanMinion,
MathPlanMinion,
MultiPlanMinion,
OptillmMinion,
)

try:
from minion.main.ldb_worker import LDBMinion
HAS_LDB = True
except ImportError:
HAS_LDB = False

__all__ = [
'WorkerMinion',
'NativeMinion',
'CotMinion',
'PythonMinion',
'MathMinion',
'PlanMinion',
'MathPlanMinion',
'MultiPlanMinion',
'OptillmMinion',
]

if HAS_LDB:
__all__.append('LDBMinion')

10 changes: 10 additions & 0 deletions minion/main/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
from minion.utils.utils import extract_number_from_string
from minion.utils.answer_extraction import extract_math_answer, extract_python

import os
import sys

# 获取LLMDebugger/programming的绝对路径
debugger_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'LLMDebugger', 'programming'))
sys.path.append(debugger_path)

# 现在可以直接导入PyGenerator等模块
from PyGenerator import xxx


class PostProcessingType(str, Enum):
NONE = "none"
Expand Down
12 changes: 12 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,15 @@ antlr4-python3-runtime
ell-ai
optillm
aiofiles

#ldb dependencies
jsonlines==3.1.0
datasets
astunparse
transformers
accelerate
astor
graphviz
#vllm
astroid
#ldb dependencies

0 comments on commit 95abb33

Please sign in to comment.