Skip to content

Commit

Permalink
make curriculum optional (temp)
Browse files Browse the repository at this point in the history
  • Loading branch information
qcampbel committed Jan 24, 2024
1 parent f9939b2 commit 42ce120
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
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.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

0 comments on commit 42ce120

Please sign in to comment.