CodeKnightDebjit commited on
Commit
9e08f1d
Β·
verified Β·
1 Parent(s): 3ce214c

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. client.py +5 -4
  2. openenv.yaml +1 -1
client.py CHANGED
@@ -21,7 +21,7 @@ Usage (async)
21
  from data_cleaning_env.models import CleanAction
22
 
23
  async def main():
24
- async with DataCleaningEnv(base_url="http://localhost:8000") as env:
25
  result = await env.reset(task_id="easy")
26
  print(result.observation.schema_hint)
27
 
@@ -34,7 +34,7 @@ Usage (async)
34
 
35
  Usage (sync wrapper)
36
  --------------------
37
- env = DataCleaningEnv(base_url="http://localhost:8000").sync()
38
  with env:
39
  result = env.reset(task_id="medium")
40
  result = env.fill_missing(column="amount", fill_strategy="median")
@@ -52,6 +52,7 @@ try:
52
  except ImportError:
53
  from openenv.core.client_types import StepResult # type: ignore[no-redef]
54
  from openenv.core.env_client import EnvClient # type: ignore[no-redef]
 
55
 
56
  # ── Local model imports (try relative then absolute) ──────────────────────────
57
  try:
@@ -83,14 +84,14 @@ class DataCleaningEnv(EnvClient[CleanAction, CleanObservation, CleanState]):
83
  All methods are async. For synchronous use, call ``.sync()`` to get a
84
  ``SyncEnvClient`` wrapper:
85
 
86
- with DataCleaningEnv(base_url="http://localhost:8000").sync() as env:
87
  result = env.reset(task_id="easy")
88
  result = env.set_value(row_index=0, column="price", value="9.99")
89
 
90
  Connecting to different backends
91
  ---------------------------------
92
  Local dev server (after ``openenv serve``):
93
- env = DataCleaningEnv(base_url="http://localhost:8000")
94
 
95
  Local Docker image (after ``openenv build``):
96
  env = await DataCleaningEnv.from_docker_image("data-cleaning-env:latest")
 
21
  from data_cleaning_env.models import CleanAction
22
 
23
  async def main():
24
+ async with DataCleaningEnv(base_url="http://localhost:7860") as env:
25
  result = await env.reset(task_id="easy")
26
  print(result.observation.schema_hint)
27
 
 
34
 
35
  Usage (sync wrapper)
36
  --------------------
37
+ env = DataCleaningEnv(base_url="http://localhost:7860").sync()
38
  with env:
39
  result = env.reset(task_id="medium")
40
  result = env.fill_missing(column="amount", fill_strategy="median")
 
52
  except ImportError:
53
  from openenv.core.client_types import StepResult # type: ignore[no-redef]
54
  from openenv.core.env_client import EnvClient # type: ignore[no-redef]
55
+ #7860
56
 
57
  # ── Local model imports (try relative then absolute) ──────────────────────────
58
  try:
 
84
  All methods are async. For synchronous use, call ``.sync()`` to get a
85
  ``SyncEnvClient`` wrapper:
86
 
87
+ with DataCleaningEnv(base_url="http://localhost:7860").sync() as env:
88
  result = env.reset(task_id="easy")
89
  result = env.set_value(row_index=0, column="price", value="9.99")
90
 
91
  Connecting to different backends
92
  ---------------------------------
93
  Local dev server (after ``openenv serve``):
94
+ env = DataCleaningEnv(base_url="http://localhost:7860")
95
 
96
  Local Docker image (after ``openenv build``):
97
  env = await DataCleaningEnv.from_docker_image("data-cleaning-env:latest")
openenv.yaml CHANGED
@@ -37,7 +37,7 @@ name: data_cleaning_env
37
  type: space
38
  runtime: fastapi
39
  app: server.app:app
40
- port: 8000
41
 
42
  # ── Package metadata ──────────────────────────────────────────────────────────
43
 
 
37
  type: space
38
  runtime: fastapi
39
  app: server.app:app
40
+ port: 7680
41
 
42
  # ── Package metadata ──────────────────────────────────────────────────────────
43