Antigravity Agent commited on
Commit
bcc2293
·
1 Parent(s): f7cade8

Deploy Fix: Disable interactive build

Browse files
Files changed (2) hide show
  1. models/liquid_ppo.py +6 -6
  2. train_hf.py +8 -2
models/liquid_ppo.py CHANGED
@@ -86,15 +86,15 @@ def make_liquid_ppo(env, verbose=1):
86
  model = PPO(
87
  "MlpPolicy",
88
  env,
89
- policy_kwargs=policy_kwargs,
90
- verbose=1,
91
- learning_rate=3e-4,
92
- n_steps=2048, # 2048 * 16 = 32,768 steps per update
93
- batch_size=4096, # Large batch size for A100
94
  n_epochs=10,
95
  gamma=0.99,
96
  gae_lambda=0.95,
97
  clip_range=0.2,
98
- device="cuda" # Force CUDA
 
99
  )
100
  return model
 
86
  model = PPO(
87
  "MlpPolicy",
88
  env,
89
+ verbose=verbose,
90
+ learning_rate=1e-3,
91
+ n_steps=2048,
92
+ batch_size=64,
 
93
  n_epochs=10,
94
  gamma=0.99,
95
  gae_lambda=0.95,
96
  clip_range=0.2,
97
+ policy_kwargs=policy_kwargs,
98
+ device='cpu' # Force CPU to avoid CUDA/Multiprocessing issues and for better performance on small nets
99
  )
100
  return model
train_hf.py CHANGED
@@ -18,8 +18,14 @@ def train_hf(repo_id, token, total_timesteps=500000):
18
  # Create Optimized Model (Parallel Envs + A100 Tuning)
19
  # Note: make_liquid_ppo now handles env creation internally for parallelism
20
  print("Creating Liquid PPO Model...")
21
- model = make_liquid_ppo(None, verbose=1)
22
- print("Model created successfully.")
 
 
 
 
 
 
23
 
24
  # Checkpoint Callback
25
  checkpoint_callback = CheckpointCallback(
 
18
  # Create Optimized Model (Parallel Envs + A100 Tuning)
19
  # Note: make_liquid_ppo now handles env creation internally for parallelism
20
  print("Creating Liquid PPO Model...")
21
+ try:
22
+ model = make_liquid_ppo(None, verbose=1)
23
+ print("Model created successfully.")
24
+ except Exception as e:
25
+ print(f"CRITICAL ERROR creating model: {e}")
26
+ import traceback
27
+ traceback.print_exc()
28
+ raise e
29
 
30
  # Checkpoint Callback
31
  checkpoint_callback = CheckpointCallback(