arjeet commited on
Commit
e26941e
·
1 Parent(s): d246804

inference update v4

Browse files
Files changed (1) hide show
  1. server/cust_env_environment.py +1 -4
server/cust_env_environment.py CHANGED
@@ -72,16 +72,13 @@ class DocSweeperEnvironment(Environment):
72
  done = False
73
  self._terminal_feedback = ""
74
 
75
- # 1. Calculate the score BEFORE the action
76
  old_score = self._calculate_state_score()
77
 
78
- # 2. Execute the action and track any direct penalties (syntax errors, bad paths)
79
  step_penalty = 0.0
80
 
81
  if action.tool_name == "done":
82
  done = True
83
  self._terminal_feedback = "Task submitted. Evaluating final state."
84
- # No direct penalty or bonus here, the final delta will handle it
85
 
86
  elif action.tool_name == "open":
87
  if action.path in self._state.vfs:
@@ -89,7 +86,7 @@ class DocSweeperEnvironment(Environment):
89
  self._terminal_feedback = f"Opened {action.path}"
90
  else:
91
  self._terminal_feedback = f"Error: File '{action.path}' not found."
92
- step_penalty -= 0.05 # Small penalty for hallucinating files
93
 
94
  elif action.tool_name == "grep":
95
  if action.search_query:
 
72
  done = False
73
  self._terminal_feedback = ""
74
 
 
75
  old_score = self._calculate_state_score()
76
 
 
77
  step_penalty = 0.0
78
 
79
  if action.tool_name == "done":
80
  done = True
81
  self._terminal_feedback = "Task submitted. Evaluating final state."
 
82
 
83
  elif action.tool_name == "open":
84
  if action.path in self._state.vfs:
 
86
  self._terminal_feedback = f"Opened {action.path}"
87
  else:
88
  self._terminal_feedback = f"Error: File '{action.path}' not found."
89
+ step_penalty -= 0.05
90
 
91
  elif action.tool_name == "grep":
92
  if action.search_query: