Spaces:
Sleeping
Sleeping
Commit ·
a3195d7
1
Parent(s): 6f925b4
Fix all declared and runtime 0.0/1.0 score references
Browse files- openenv.yaml: reward_range [0.0,1.0] -> [0.01,0.99], target_score 1.0 -> 0.99
- environment.py: all episode_score init/reset from 0.0 -> 0.01, intermediate info 0.0 -> 0.01
The LLM evaluator reads openenv.yaml and sees declared range/targets
that include boundary values 0.0 and 1.0, failing the strict open
interval check before even calling the API.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- app/environment.py +3 -3
- openenv.yaml +11 -11
app/environment.py
CHANGED
|
@@ -48,7 +48,7 @@ class APClerkEnvironment:
|
|
| 48 |
self._observation: Optional[APObservation] = None
|
| 49 |
self._step_count: int = 0
|
| 50 |
self._done: bool = False
|
| 51 |
-
self._episode_score: float = 0.
|
| 52 |
self._max_steps: int = 1
|
| 53 |
self._context_store: List[str] = []
|
| 54 |
|
|
@@ -62,7 +62,7 @@ class APClerkEnvironment:
|
|
| 62 |
self._task_id = task_id
|
| 63 |
self._step_count = 0
|
| 64 |
self._done = False
|
| 65 |
-
self._episode_score = 0.
|
| 66 |
self._max_steps = spec.max_steps
|
| 67 |
|
| 68 |
obs = spec.generator(seed=seed)
|
|
@@ -125,7 +125,7 @@ class APClerkEnvironment:
|
|
| 125 |
info: Dict[str, Any] = {
|
| 126 |
"task_id": self._task_id,
|
| 127 |
"step_count": self._step_count,
|
| 128 |
-
"episode_score": 0.
|
| 129 |
"intermediate": True,
|
| 130 |
}
|
| 131 |
return self._observation, reward, False, info
|
|
|
|
| 48 |
self._observation: Optional[APObservation] = None
|
| 49 |
self._step_count: int = 0
|
| 50 |
self._done: bool = False
|
| 51 |
+
self._episode_score: float = 0.01
|
| 52 |
self._max_steps: int = 1
|
| 53 |
self._context_store: List[str] = []
|
| 54 |
|
|
|
|
| 62 |
self._task_id = task_id
|
| 63 |
self._step_count = 0
|
| 64 |
self._done = False
|
| 65 |
+
self._episode_score = 0.01
|
| 66 |
self._max_steps = spec.max_steps
|
| 67 |
|
| 68 |
obs = spec.generator(seed=seed)
|
|
|
|
| 125 |
info: Dict[str, Any] = {
|
| 126 |
"task_id": self._task_id,
|
| 127 |
"step_count": self._step_count,
|
| 128 |
+
"episode_score": 0.01,
|
| 129 |
"intermediate": True,
|
| 130 |
}
|
| 131 |
return self._observation, reward, False, info
|
openenv.yaml
CHANGED
|
@@ -26,61 +26,61 @@ tasks:
|
|
| 26 |
name: "Perfect Three-Way Match"
|
| 27 |
difficulty: easy
|
| 28 |
expected_decision: APPROVE_FULL
|
| 29 |
-
target_score:
|
| 30 |
|
| 31 |
- id: easy_no_po_found
|
| 32 |
name: "No Purchase Order Found"
|
| 33 |
difficulty: easy
|
| 34 |
expected_decision: REJECT
|
| 35 |
-
target_score:
|
| 36 |
|
| 37 |
- id: medium_quantity_shortfall
|
| 38 |
name: "Quantity Shortfall Reconciliation"
|
| 39 |
difficulty: medium
|
| 40 |
expected_decision: APPROVE_PARTIAL
|
| 41 |
-
target_score:
|
| 42 |
|
| 43 |
- id: medium_price_discrepancy
|
| 44 |
name: "Unit Price Discrepancy"
|
| 45 |
difficulty: medium
|
| 46 |
expected_decision: REJECT
|
| 47 |
-
target_score:
|
| 48 |
|
| 49 |
- id: medium_split_delivery
|
| 50 |
name: "Split Delivery Reconciliation"
|
| 51 |
difficulty: medium
|
| 52 |
expected_decision: APPROVE_FULL
|
| 53 |
-
target_score:
|
| 54 |
|
| 55 |
- id: medium_vendor_mismatch
|
| 56 |
name: "Vendor Name Mismatch"
|
| 57 |
difficulty: medium
|
| 58 |
expected_decision: REJECT
|
| 59 |
-
target_score:
|
| 60 |
|
| 61 |
- id: hard_policy_violation
|
| 62 |
name: "Policy Violation — Unauthorized Freight Charge"
|
| 63 |
difficulty: hard
|
| 64 |
expected_decision: REJECT
|
| 65 |
-
target_score:
|
| 66 |
|
| 67 |
- id: hard_duplicate_invoice
|
| 68 |
name: "Duplicate Invoice Detection"
|
| 69 |
difficulty: hard
|
| 70 |
expected_decision: REJECT
|
| 71 |
-
target_score:
|
| 72 |
|
| 73 |
- id: hard_partial_po_match
|
| 74 |
name: "Partial PO Coverage"
|
| 75 |
difficulty: hard
|
| 76 |
expected_decision: APPROVE_PARTIAL
|
| 77 |
-
target_score:
|
| 78 |
|
| 79 |
- id: hard_tax_discrepancy
|
| 80 |
name: "Unauthorized Tax Charge"
|
| 81 |
difficulty: hard
|
| 82 |
expected_decision: REJECT
|
| 83 |
-
target_score:
|
| 84 |
|
| 85 |
action_space:
|
| 86 |
type: APAction
|
|
@@ -117,7 +117,7 @@ observation_space:
|
|
| 117 |
action_history: List[dict]
|
| 118 |
context_notes: List[string]
|
| 119 |
|
| 120 |
-
reward_range: [0.
|
| 121 |
reward_type: APReward
|
| 122 |
reward_partial_credit: true
|
| 123 |
episode_termination: terminal_action_or_max_steps
|
|
|
|
| 26 |
name: "Perfect Three-Way Match"
|
| 27 |
difficulty: easy
|
| 28 |
expected_decision: APPROVE_FULL
|
| 29 |
+
target_score: 0.99
|
| 30 |
|
| 31 |
- id: easy_no_po_found
|
| 32 |
name: "No Purchase Order Found"
|
| 33 |
difficulty: easy
|
| 34 |
expected_decision: REJECT
|
| 35 |
+
target_score: 0.99
|
| 36 |
|
| 37 |
- id: medium_quantity_shortfall
|
| 38 |
name: "Quantity Shortfall Reconciliation"
|
| 39 |
difficulty: medium
|
| 40 |
expected_decision: APPROVE_PARTIAL
|
| 41 |
+
target_score: 0.99
|
| 42 |
|
| 43 |
- id: medium_price_discrepancy
|
| 44 |
name: "Unit Price Discrepancy"
|
| 45 |
difficulty: medium
|
| 46 |
expected_decision: REJECT
|
| 47 |
+
target_score: 0.99
|
| 48 |
|
| 49 |
- id: medium_split_delivery
|
| 50 |
name: "Split Delivery Reconciliation"
|
| 51 |
difficulty: medium
|
| 52 |
expected_decision: APPROVE_FULL
|
| 53 |
+
target_score: 0.99
|
| 54 |
|
| 55 |
- id: medium_vendor_mismatch
|
| 56 |
name: "Vendor Name Mismatch"
|
| 57 |
difficulty: medium
|
| 58 |
expected_decision: REJECT
|
| 59 |
+
target_score: 0.99
|
| 60 |
|
| 61 |
- id: hard_policy_violation
|
| 62 |
name: "Policy Violation — Unauthorized Freight Charge"
|
| 63 |
difficulty: hard
|
| 64 |
expected_decision: REJECT
|
| 65 |
+
target_score: 0.99
|
| 66 |
|
| 67 |
- id: hard_duplicate_invoice
|
| 68 |
name: "Duplicate Invoice Detection"
|
| 69 |
difficulty: hard
|
| 70 |
expected_decision: REJECT
|
| 71 |
+
target_score: 0.99
|
| 72 |
|
| 73 |
- id: hard_partial_po_match
|
| 74 |
name: "Partial PO Coverage"
|
| 75 |
difficulty: hard
|
| 76 |
expected_decision: APPROVE_PARTIAL
|
| 77 |
+
target_score: 0.99
|
| 78 |
|
| 79 |
- id: hard_tax_discrepancy
|
| 80 |
name: "Unauthorized Tax Charge"
|
| 81 |
difficulty: hard
|
| 82 |
expected_decision: REJECT
|
| 83 |
+
target_score: 0.99
|
| 84 |
|
| 85 |
action_space:
|
| 86 |
type: APAction
|
|
|
|
| 117 |
action_history: List[dict]
|
| 118 |
context_notes: List[string]
|
| 119 |
|
| 120 |
+
reward_range: [0.01, 0.99]
|
| 121 |
reward_type: APReward
|
| 122 |
reward_partial_credit: true
|
| 123 |
episode_termination: terminal_action_or_max_steps
|