Eishaan commited on
Commit
874e22a
·
1 Parent(s): be67b73

fixed metrics

Browse files
Files changed (4) hide show
  1. seeds.py +2 -2
  2. server/app.py +5 -4
  3. server/environment.py +4 -4
  4. server/grader.py +2 -2
seeds.py CHANGED
@@ -1048,7 +1048,7 @@ def golden_task7(conn: sqlite3.Connection) -> None:
1048
  # TASK 8: Data Poisoning & Quarantine Routing (Extreme)
1049
  # =============================================================================
1050
 
1051
- TASK8_TARGET_DDL = \"\"\"
1052
  CREATE TABLE inventory (
1053
  id INTEGER PRIMARY KEY,
1054
  name TEXT NOT NULL,
@@ -1063,7 +1063,7 @@ CREATE TABLE inventory_quarantine (
1063
  raw_sku TEXT,
1064
  error_reason TEXT
1065
  );
1066
- \"\"\".strip()
1067
 
1068
  def seed_task8(conn):
1069
  conn.execute("CREATE TABLE staging_data (id INTEGER, item TEXT, cost TEXT, sku_code TEXT)")
 
1048
  # TASK 8: Data Poisoning & Quarantine Routing (Extreme)
1049
  # =============================================================================
1050
 
1051
+ TASK8_TARGET_DDL = """
1052
  CREATE TABLE inventory (
1053
  id INTEGER PRIMARY KEY,
1054
  name TEXT NOT NULL,
 
1063
  raw_sku TEXT,
1064
  error_reason TEXT
1065
  );
1066
+ """.strip()
1067
 
1068
  def seed_task8(conn):
1069
  conn.execute("CREATE TABLE staging_data (id INTEGER, item TEXT, cost TEXT, sku_code TEXT)")
server/app.py CHANGED
@@ -18,14 +18,15 @@ from typing import Any, Dict, List, Optional
18
  from fastapi import Body
19
 
20
  # Support both in-repo and standalone imports
 
21
  try:
22
- from openenv.core.env_server.http_server import create_app
23
- from ..models import MigrationAction, MigrationObservation
24
- from .environment import DbMigrationEnvironment
25
- except ImportError:
26
  from openenv.core.env_server.http_server import create_app
27
  from models import MigrationAction, MigrationObservation
28
  from server.environment import DbMigrationEnvironment
 
 
 
 
29
 
30
 
31
  # Get task name from environment variable (default to column-restructure)
 
18
  from fastapi import Body
19
 
20
  # Support both in-repo and standalone imports
21
+ import server.environment # Ensuring server is treated as a package
22
  try:
 
 
 
 
23
  from openenv.core.env_server.http_server import create_app
24
  from models import MigrationAction, MigrationObservation
25
  from server.environment import DbMigrationEnvironment
26
+ except ImportError:
27
+ from openenv.core.env_server.http_server import create_app
28
+ from ..models import MigrationAction, MigrationObservation
29
+ from .environment import DbMigrationEnvironment
30
 
31
 
32
  # Get task name from environment variable (default to column-restructure)
server/environment.py CHANGED
@@ -22,13 +22,13 @@ from typing import Any, Dict, List, Optional
22
 
23
  # Support both in-repo and standalone imports
24
  try:
25
- from openenv.core.env_server.interfaces import Environment
26
- from ..models import MigrationAction, MigrationObservation, MigrationState
27
- from .grader import StateReconciler
28
- except ImportError:
29
  from openenv.core.env_server.interfaces import Environment
30
  from models import MigrationAction, MigrationObservation, MigrationState
31
  from server.grader import StateReconciler
 
 
 
 
32
 
33
  # Import seeds (handle both import paths)
34
  try:
 
22
 
23
  # Support both in-repo and standalone imports
24
  try:
 
 
 
 
25
  from openenv.core.env_server.interfaces import Environment
26
  from models import MigrationAction, MigrationObservation, MigrationState
27
  from server.grader import StateReconciler
28
+ except ImportError:
29
+ from openenv.core.env_server.interfaces import Environment
30
+ from ..models import MigrationAction, MigrationObservation, MigrationState
31
+ from .grader import StateReconciler
32
 
33
  # Import seeds (handle both import paths)
34
  try:
server/grader.py CHANGED
@@ -27,9 +27,9 @@ from typing import Any, Dict, List, Optional, Set, Tuple
27
 
28
  # Import seeds for golden migration functions
29
  try:
30
- from .. import seeds
31
- except ImportError:
32
  import seeds
 
 
33
 
34
 
35
  def _get_table_names(conn: sqlite3.Connection) -> Set[str]:
 
27
 
28
  # Import seeds for golden migration functions
29
  try:
 
 
30
  import seeds
31
+ except ImportError:
32
+ from .. import seeds
33
 
34
 
35
  def _get_table_names(conn: sqlite3.Connection) -> Set[str]: