100XZX001 commited on
Commit
6016948
·
verified ·
1 Parent(s): eab93ea

Update training.py

Browse files
Files changed (1) hide show
  1. training.py +4 -3
training.py CHANGED
@@ -1,5 +1,4 @@
1
- # training.py – FIXED PPO training (no variable names changed)
2
-
3
  import json
4
  import torch
5
  import torch.nn.functional as F
@@ -20,7 +19,7 @@ from environment import CodeReviewEnv
20
  from models import (
21
  RunTests, RunLinter, Inspect,
22
  ProposeFix, WriteComment, AskQuestion,
23
- Done, Skip
24
  )
25
 
26
  # ======================================================================
@@ -85,6 +84,8 @@ def map_to_env(action: AgentAction):
85
  return WriteComment(comment_text=action.content or "")
86
  elif action.action_type == "question":
87
  return AskQuestion(question=action.content or "")
 
 
88
  elif action.action_type == "done":
89
  return Done()
90
  else:
 
1
+ # training.py
 
2
  import json
3
  import torch
4
  import torch.nn.functional as F
 
19
  from models import (
20
  RunTests, RunLinter, Inspect,
21
  ProposeFix, WriteComment, AskQuestion,
22
+ Done, Skip , QueryDocs
23
  )
24
 
25
  # ======================================================================
 
84
  return WriteComment(comment_text=action.content or "")
85
  elif action.action_type == "question":
86
  return AskQuestion(question=action.content or "")
87
+ elif action.action_type == "query_docs": # <-- new
88
+ return QueryDocs(query_topic=action.content or "")
89
  elif action.action_type == "done":
90
  return Done()
91
  else: