Improved formatting of main for remote
This commit is contained in:
parent
10d5315926
commit
656d42f7a0
2 changed files with 6 additions and 7 deletions
6
agent.py
6
agent.py
|
@ -15,7 +15,7 @@ from godot_rl.core.utils import can_import
|
|||
from godot_rl.wrappers.onnx.stable_baselines_export import export_ppo_model_as_onnx
|
||||
from godot_rl.wrappers.stable_baselines_wrapper import StableBaselinesGodotEnv
|
||||
|
||||
def main(policy_name=None, policy=None, parseargs=None):
|
||||
def main(policy_name=None, policy=None, parseargs=None, seed=None, speedup=None):
|
||||
if can_import("ray"):
|
||||
print("WARNING: SB3 and ray[rllib] are not compatible.")
|
||||
|
||||
|
@ -71,9 +71,9 @@ def main(policy_name=None, policy=None, parseargs=None):
|
|||
env = StableBaselinesGodotEnv(
|
||||
env_path=args.env_path,
|
||||
show_window=args.viz,
|
||||
seed=args.seed,
|
||||
seed=args.seed if seed is None else seed,
|
||||
n_parallel=args.n_parallel,
|
||||
speedup=args.speedup
|
||||
speedup=args.speedup if speedup is None else speedup
|
||||
)
|
||||
env = VecMonitor(env)
|
||||
|
||||
|
|
7
main.py
7
main.py
|
@ -2,7 +2,6 @@ from policy import policies
|
|||
from agent import main
|
||||
import args
|
||||
|
||||
for policy_name, policy in policies.items():
|
||||
if policy_name in ["policy_big_tanh", "policy_big_optim_tanh"]:
|
||||
print(policy_name)
|
||||
main(policy_name=policy_name, policy=policy, parseargs=args.parse_args())
|
||||
for i in range(4):
|
||||
for policy_name, policy in policies.items():
|
||||
main(policy_name=policy_name, policy=policy, parseargs=args.parse_args(), speedup=50)
|
||||
|
|
Loading…
Reference in a new issue