Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make curriculum optional (temp) #71

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mdagent/mainagent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def __init__(
resume=False,
top_k_tools=20, # set "all" if you want to use all tools (& skills if resume)
use_human_tool=False,
curriculum=False,
):
if path_registry is None:
path_registry = PathRegistry.get_instance()
Expand Down Expand Up @@ -78,6 +79,7 @@ def __init__(
verbose=verbose,
ckpt_dir=ckpt_dir,
resume=resume,
curriculum=curriculum,
)

def _initialize_tools_and_agent(self, user_input=None):
Expand Down
2 changes: 2 additions & 0 deletions mdagent/subagents/subagent_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def __init__(
ckpt_dir="ckpt",
resume=False,
retrieval_top_k=5,
curriculum=False,
):
self.path_registry = path_registry
self.subagents_model = subagents_model
Expand All @@ -24,6 +25,7 @@ def __init__(
self.ckpt_dir = ckpt_dir
self.resume = resume
self.retrieval_top_k = retrieval_top_k
self.curriculum = curriculum


class SubAgentInitializer:
Expand Down
6 changes: 4 additions & 2 deletions mdagent/tools/maketools.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ def make_all_tools(
CreateNewTool(subagent_settings=subagent_settings),
RetryExecuteSkill(subagent_settings=subagent_settings),
SkillRetrieval(subagent_settings=subagent_settings),
WorkflowPlan(subagent_settings=subagent_settings),
]
if subagent_settings.curriculum:
subagents_tools.append(WorkflowPlan(subagent_settings=subagent_settings))

# add 'learned' tools here
# disclaimer: assume they don't need path_registry
Expand Down Expand Up @@ -139,8 +140,9 @@ def get_tools(
CreateNewTool(subagent_settings=subagent_settings),
RetryExecuteSkill(subagent_settings=subagent_settings),
SkillRetrieval(subagent_settings=subagent_settings),
WorkflowPlan(subagent_settings=subagent_settings),
]
if subagent_settings is not None and subagent_settings.curriculum:
retrieved_tools.append(WorkflowPlan(subagent_settings=subagent_settings))
top_k_tools -= len(retrieved_tools)
all_tools = make_all_tools(
llm, subagent_settings, skip_subagents=True, human=human
Expand Down
Loading