Arun006 commited on
Commit
6a97d3e
·
1 Parent(s): f3f89d0

fixed error 1

Browse files
Files changed (2) hide show
  1. env/grader.py +5 -8
  2. inference.py +5 -0
env/grader.py CHANGED
@@ -1,11 +1,8 @@
1
  class Grader:
2
  @staticmethod
3
  def grade(trajectory):
4
- try:
5
- total = 0
6
- for step in trajectory:
7
- if isinstance(step, dict):
8
- total += step.get("reward", 0)
9
- return float(total) / 10
10
- except Exception:
11
- return 0.0
 
1
  class Grader:
2
  @staticmethod
3
  def grade(trajectory):
4
+ total = 0
5
+ for step in trajectory:
6
+ if isinstance(step, dict):
7
+ total += step.get("reward", 0)
8
+ return float(total) / 10
 
 
 
inference.py CHANGED
@@ -6,6 +6,11 @@ Uses LLM API with deterministic fallback.
6
 
7
  import sys
8
  import os
 
 
 
 
 
9
 
10
  # Safe import of OpenAI client
11
  try:
 
6
 
7
  import sys
8
  import os
9
+ sys.path.append(os.getcwd())
10
+
11
+ # Verify grader import works
12
+ import importlib
13
+ importlib.import_module("env.grader")
14
 
15
  # Safe import of OpenAI client
16
  try: