making test case for typing bug and fixing some small typing errors in bc
This commit is contained in:
14
tests/policies/test_forward_pass.py
Normal file
14
tests/policies/test_forward_pass.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import torch
|
||||
import pickle
|
||||
import json5
|
||||
from src.bc import BehaviorCloningPolicy
|
||||
config_path = "config/networks.json5"
|
||||
|
||||
with open(config_path, 'r') as cfg:
|
||||
config = json5.load(cfg)
|
||||
|
||||
filestr = 'tests/policies/base_'
|
||||
|
||||
batch = pickle.load(open(filestr+'_test_batch.pkl', 'rb'))
|
||||
policy = BehaviorCloningPolicy.load_model(config, filestr)
|
||||
action = policy(batch)
|
||||
Reference in New Issue
Block a user