Fix tests
This commit is contained in:
@@ -11,11 +11,11 @@ filestr = 'tests/policies/base_'
|
||||
|
||||
|
||||
def test_forward_pass():
|
||||
batch = pickle.load(open(filestr + '_test_batch.pkl', 'rb'))
|
||||
batch['relative_state'] = batch['relative_state'].float()
|
||||
policy = BehaviorCloningPolicy.load_model(config, filestr)
|
||||
policy.policy = policy.policy.type(batch['state'].dtype)
|
||||
action = policy(batch)
|
||||
i = torch.where(action.isnan())[0]
|
||||
for key in batch.keys():
|
||||
print(batch[key][i])
|
||||
batch = pickle.load(open(filestr + '_test_batch.pkl', 'rb'))
|
||||
batch['relative_state'] = batch['relative_state'].float()
|
||||
policy = BehaviorCloningPolicy.load_model(config, filestr)
|
||||
policy.policy = policy.policy.type(batch['state'].dtype)
|
||||
action = policy(batch)
|
||||
i = torch.where(action.isnan())[0]
|
||||
for key in batch.keys():
|
||||
print(batch[key][i])
|
||||
|
||||
@@ -7,7 +7,7 @@ with open(config_path, 'r') as cfg:
|
||||
config = json5.load(cfg)
|
||||
|
||||
def test_deepsets_policy():
|
||||
module = DeepSetsPolicy(config["ego_state"], config["deepsets"], config["path_encoder"], config["head"])
|
||||
module = DeepSetsPolicy(config)
|
||||
|
||||
ns = 5
|
||||
nv = 7
|
||||
|
||||
Reference in New Issue
Block a user