Spaces:
Sleeping
Sleeping
Update env/env.py
Browse files- env/env.py +3 -1
env/env.py
CHANGED
|
@@ -39,7 +39,9 @@ class CodeReviewEnv:
|
|
| 39 |
|
| 40 |
elif action.action_type in ["approve", "request_changes"]:
|
| 41 |
score = grade(self.comments, self.task["expected_issues"])
|
| 42 |
-
|
|
|
|
|
|
|
| 43 |
done = True
|
| 44 |
|
| 45 |
obs = Observation(
|
|
|
|
| 39 |
|
| 40 |
elif action.action_type in ["approve", "request_changes"]:
|
| 41 |
score = grade(self.comments, self.task["expected_issues"])
|
| 42 |
+
MIN_VALID_SCORE = 0.002
|
| 43 |
+
MAX_VALID_SCORE = 0.998
|
| 44 |
+
reward = min(max(score, MIN_VALID_SCORE), MAX_VALID_SCORE)
|
| 45 |
done = True
|
| 46 |
|
| 47 |
obs = Observation(
|