Spaces:
Sleeping
Sleeping
Commit ·
bc664e2
1
Parent(s): 0446283
inference issues
Browse files- __pycache__/__init__.cpython-313.pyc +0 -0
- __pycache__/client.cpython-313.pyc +0 -0
- inference.py +11 -3
- openenv_FitScript.egg-info/PKG-INFO +9 -0
- openenv_FitScript.egg-info/SOURCES.txt +15 -0
- openenv_FitScript.egg-info/dependency_links.txt +1 -0
- openenv_FitScript.egg-info/entry_points.txt +2 -0
- openenv_FitScript.egg-info/requires.txt +5 -0
- openenv_FitScript.egg-info/top_level.txt +1 -0
__pycache__/__init__.cpython-313.pyc
CHANGED
|
Binary files a/__pycache__/__init__.cpython-313.pyc and b/__pycache__/__init__.cpython-313.pyc differ
|
|
|
__pycache__/client.cpython-313.pyc
CHANGED
|
Binary files a/__pycache__/client.cpython-313.pyc and b/__pycache__/client.cpython-313.pyc differ
|
|
|
inference.py
CHANGED
|
@@ -39,7 +39,7 @@ API_KEY: str = os.environ["HF_TOKEN"]
|
|
| 39 |
|
| 40 |
TASK_NAME: str = os.getenv("FITSCRIPT_TASK", "basic_plan")
|
| 41 |
BENCHMARK: str = "fitscript_env"
|
| 42 |
-
IMAGE_NAME: str = os.getenv("FITSCRIPT_IMAGE", "FitScript-env:latest")
|
| 43 |
MAX_STEPS: int = int(os.getenv("MAX_STEPS", "8"))
|
| 44 |
|
| 45 |
# ---------------------------------------------------------------------------
|
|
@@ -167,7 +167,12 @@ async def run_episode() -> None:
|
|
| 167 |
|
| 168 |
env = None
|
| 169 |
try:
|
| 170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 171 |
|
| 172 |
# Reset
|
| 173 |
reset_result = env.reset()
|
|
@@ -234,7 +239,10 @@ async def run_episode() -> None:
|
|
| 234 |
print(f"[ERROR] {error_msg}", flush=True, file=sys.stderr)
|
| 235 |
finally:
|
| 236 |
if env is not None:
|
| 237 |
-
|
|
|
|
|
|
|
|
|
|
| 238 |
|
| 239 |
log_end(success, step, final_score, rewards)
|
| 240 |
|
|
|
|
| 39 |
|
| 40 |
TASK_NAME: str = os.getenv("FITSCRIPT_TASK", "basic_plan")
|
| 41 |
BENCHMARK: str = "fitscript_env"
|
| 42 |
+
IMAGE_NAME: str = os.getenv("FITSCRIPT_IMAGE") or os.getenv("LOCAL_IMAGE_NAME", "FitScript-env:latest")
|
| 43 |
MAX_STEPS: int = int(os.getenv("MAX_STEPS", "8"))
|
| 44 |
|
| 45 |
# ---------------------------------------------------------------------------
|
|
|
|
| 167 |
|
| 168 |
env = None
|
| 169 |
try:
|
| 170 |
+
USE_DOCKER = os.getenv("USE_DOCKER", "true").lower() == "true"
|
| 171 |
+
|
| 172 |
+
if USE_DOCKER:
|
| 173 |
+
env = await FitscriptEnv.from_docker_image(IMAGE_NAME)
|
| 174 |
+
else:
|
| 175 |
+
env = FitscriptEnv(base_url="http://localhost:8000")
|
| 176 |
|
| 177 |
# Reset
|
| 178 |
reset_result = env.reset()
|
|
|
|
| 239 |
print(f"[ERROR] {error_msg}", flush=True, file=sys.stderr)
|
| 240 |
finally:
|
| 241 |
if env is not None:
|
| 242 |
+
if USE_DOCKER:
|
| 243 |
+
await env.close()
|
| 244 |
+
else:
|
| 245 |
+
env.close()
|
| 246 |
|
| 247 |
log_end(success, step, final_score, rewards)
|
| 248 |
|
openenv_FitScript.egg-info/PKG-INFO
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: openenv-FitScript
|
| 3 |
+
Version: 0.1.0
|
| 4 |
+
Summary: Fitscript environment for OpenEnv
|
| 5 |
+
Requires-Python: >=3.10
|
| 6 |
+
Requires-Dist: openenv-core[core]>=0.2.2
|
| 7 |
+
Provides-Extra: dev
|
| 8 |
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
| 9 |
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
openenv_FitScript.egg-info/SOURCES.txt
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
README.md
|
| 2 |
+
pyproject.toml
|
| 3 |
+
./__init__.py
|
| 4 |
+
./client.py
|
| 5 |
+
./inference.py
|
| 6 |
+
./models.py
|
| 7 |
+
openenv_FitScript.egg-info/PKG-INFO
|
| 8 |
+
openenv_FitScript.egg-info/SOURCES.txt
|
| 9 |
+
openenv_FitScript.egg-info/dependency_links.txt
|
| 10 |
+
openenv_FitScript.egg-info/entry_points.txt
|
| 11 |
+
openenv_FitScript.egg-info/requires.txt
|
| 12 |
+
openenv_FitScript.egg-info/top_level.txt
|
| 13 |
+
server/FitScript_environment.py
|
| 14 |
+
server/__init__.py
|
| 15 |
+
server/app.py
|
openenv_FitScript.egg-info/dependency_links.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
|
openenv_FitScript.egg-info/entry_points.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[console_scripts]
|
| 2 |
+
server = FitScript.server.app:main
|
openenv_FitScript.egg-info/requires.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
openenv-core[core]>=0.2.2
|
| 2 |
+
|
| 3 |
+
[dev]
|
| 4 |
+
pytest>=8.0.0
|
| 5 |
+
pytest-cov>=4.0.0
|
openenv_FitScript.egg-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
FitScript
|