Skip to content

Commit

Permalink
Fix policy_trainer_test
Browse files Browse the repository at this point in the history
MyEnv needs to have is_tensor_based
  • Loading branch information
emailweixu committed Sep 22, 2023
1 parent 9bf21e8 commit e94f122
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions alf/algorithms/rl_algorithm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ def __init__(self, batch_size, obs_shape=(2, ), reward_dim=1):
shape=(), dtype='int64', minimum=0, maximum=2)
self.reset()

@property
def is_tensor_based(self):
return True

def observation_spec(self):
return self._observation_spec

Expand Down

0 comments on commit e94f122

Please sign in to comment.