Skip to content

Commit

Permalink
Merge branch 'main' into learn_flag
Browse files Browse the repository at this point in the history
  • Loading branch information
SamCox822 authored Feb 19, 2024
2 parents 2c7c52e + 427624a commit a0e5566
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 49 deletions.
2 changes: 2 additions & 0 deletions mdagent/mainagent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(
learn=True,
top_k_tools=20, # set "all" if you want to use all tools (& skills if resume)
use_human_tool=False,
curriculum=True,
uploaded_files=[], # user input files to add to path registry
):
if path_registry is None:
Expand Down Expand Up @@ -88,6 +89,7 @@ def __init__(
verbose=verbose,
ckpt_dir=ckpt_dir,
resume=resume,
curriculum=curriculum,
)

def _initialize_tools_and_agent(self, user_input=None):
Expand Down
5 changes: 5 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=True,
):
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 All @@ -40,6 +42,7 @@ def __init__(self, settings: Optional[SubAgentSettings] = None):
self.ckpt_dir = settings.ckpt_dir
self.resume = settings.resume
self.retrieval_top_k = settings.retrieval_top_k
self.curriculum = settings.curriculum

def create_action(self, **overrides):
params = {
Expand All @@ -61,6 +64,8 @@ def create_critic(self, **overrides):
return Critic(**params)

def create_curriculum(self, **overrides):
if not self.curriculum:
return None
params = {
"model": self.subagents_model,
"temp": self.temp,
Expand Down
Loading

0 comments on commit a0e5566

Please sign in to comment.