making test case for typing bug and fixing some small typing errors in bc

This commit is contained in:
Arec
2021-07-22 08:23:46 -07:00
parent 827a8e7172
commit 91d052445e
6 changed files with 42 additions and 17 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View 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)