seatyyy commited on
Commit
697e014
·
verified ·
1 Parent(s): 8c7f5b4

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. server/environment.py +6 -2
server/environment.py CHANGED
@@ -59,6 +59,7 @@ class SkillForgeEnvironment(Environment):
59
  def step(self, action: SkillForgeAction) -> SkillForgeObservation:
60
  self._state.step_count += 1
61
  task = TASKS[self.task_idx]
 
62
 
63
  # --- create_skill: store template, stay on current task ---
64
  if action.action_type == "create_skill":
@@ -102,9 +103,12 @@ class SkillForgeEnvironment(Environment):
102
 
103
  result_correct, result_output = self._evaluate(exec_code, task["dataframe"], task["expected_output"])
104
 
 
 
 
105
  if result_correct:
106
- reward = 2.0
107
- reward -= 0.001 * token_cost
108
  if action.action_type == "use_skill":
109
  reward += 0.5
110
  self.tasks_solved += 1
 
59
  def step(self, action: SkillForgeAction) -> SkillForgeObservation:
60
  self._state.step_count += 1
61
  task = TASKS[self.task_idx]
62
+ reward = 0.0
63
 
64
  # --- create_skill: store template, stay on current task ---
65
  if action.action_type == "create_skill":
 
103
 
104
  result_correct, result_output = self._evaluate(exec_code, task["dataframe"], task["expected_output"])
105
 
106
+ if action.action_type == "create_skill":
107
+ result_correct = True
108
+
109
  if result_correct:
110
+ reward += 2.0
111
+ reward -= 0.001 * token_cost
112
  if action.action_type == "use_skill":
113
  reward += 0.5
114
  self.tasks_solved += 1