Spaces:
Runtime error
Runtime error
Antigravity Agent
commited on
Commit
·
39eca3b
1
Parent(s):
bcc2293
Deploy Fix: Disable interactive build
Browse files- env/drone_3d.py +11 -11
- models/liquid_ppo.py +2 -2
- train_hf.py +1 -0
env/drone_3d.py
CHANGED
|
@@ -3,17 +3,17 @@ import gymnasium as gym
|
|
| 3 |
from opensimplex import OpenSimplex
|
| 4 |
import time
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
try:
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
except ImportError:
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
|
| 18 |
class WindField:
|
| 19 |
def __init__(self, seed=42, scale=0.1, speed=1.0):
|
|
|
|
| 3 |
from opensimplex import OpenSimplex
|
| 4 |
import time
|
| 5 |
|
| 6 |
+
# PyFlyt import removed to avoid PyBullet overhead/issues
|
| 7 |
+
# try:
|
| 8 |
+
# from PyFlyt.gym_envs.quadx_envs.quadx_waypoints_env import QuadXWaypointsEnv
|
| 9 |
+
# PYFLYT_AVAILABLE = True
|
| 10 |
+
# except ImportError:
|
| 11 |
+
# PYFLYT_AVAILABLE = False
|
| 12 |
+
# # Create a dummy base class if PyFlyt is missing
|
| 13 |
+
# class QuadXWaypointsEnv(gym.Env):
|
| 14 |
+
# metadata = {"render_modes": ["human", "rgb_array"]}
|
| 15 |
+
# def __init__(self, render_mode=None):
|
| 16 |
+
# self.render_mode = render_mode
|
| 17 |
|
| 18 |
class WindField:
|
| 19 |
def __init__(self, seed=42, scale=0.1, speed=1.0):
|
models/liquid_ppo.py
CHANGED
|
@@ -69,8 +69,8 @@ def make_liquid_ppo(env, verbose=1):
|
|
| 69 |
"""
|
| 70 |
# Parallel Environments for High-Performance Training
|
| 71 |
# A100/A10G are data hungry. We need to run physics on many CPU cores to feed them.
|
| 72 |
-
# We will use
|
| 73 |
-
n_envs =
|
| 74 |
env = make_vec_env(
|
| 75 |
lambda: Drone3DEnv(render_mode=None, wind_scale=10.0, wind_speed=5.0),
|
| 76 |
n_envs=n_envs,
|
|
|
|
| 69 |
"""
|
| 70 |
# Parallel Environments for High-Performance Training
|
| 71 |
# A100/A10G are data hungry. We need to run physics on many CPU cores to feed them.
|
| 72 |
+
# We will use 1 environment to debug (DummyVecEnv)
|
| 73 |
+
n_envs = 1
|
| 74 |
env = make_vec_env(
|
| 75 |
lambda: Drone3DEnv(render_mode=None, wind_scale=10.0, wind_speed=5.0),
|
| 76 |
n_envs=n_envs,
|
train_hf.py
CHANGED
|
@@ -58,6 +58,7 @@ def train_hf(repo_id, token, total_timesteps=500000):
|
|
| 58 |
repo_type="model"
|
| 59 |
)
|
| 60 |
print("Upload Complete!")
|
|
|
|
| 61 |
|
| 62 |
except Exception as e:
|
| 63 |
print(f"Error uploading to Hub: {e}")
|
|
|
|
| 58 |
repo_type="model"
|
| 59 |
)
|
| 60 |
print("Upload Complete!")
|
| 61 |
+
print("SCRIPT FINISHED SUCCESSFULLY")
|
| 62 |
|
| 63 |
except Exception as e:
|
| 64 |
print(f"Error uploading to Hub: {e}")
|