working on tester
This commit is contained in:
parent
e68dcd3c64
commit
905d12bfa2
@ -1,8 +1,28 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
|
import gym
|
||||||
|
import logging
|
||||||
|
|
||||||
|
|
||||||
|
def test_policy_in_env(policy, env, num_episodes, num_timesteps=0):
|
||||||
|
|
||||||
|
assert sum([num_episodes > 0, num_timesteps > 0]) == 1, \
|
||||||
|
'One and only one collection number specification permitted!'
|
||||||
|
|
||||||
def test_policy_in_env(policy, env):
|
|
||||||
# make another env as the original is for training data collection
|
# make another env as the original is for training data collection
|
||||||
env_ = env
|
env_id = env.spec.id
|
||||||
|
env_ = gym.make(env_id)
|
||||||
|
# current_observation = env_.reset()
|
||||||
|
|
||||||
|
# test policy
|
||||||
|
if num_episodes > 0:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
if num_timesteps > 0:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# log
|
||||||
|
|
||||||
|
|
||||||
|
# clear scene
|
||||||
|
env_.close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user