Update imitation version

This commit is contained in:
ebuehrle
2021-09-14 18:02:56 +02:00
parent 763a7bb0d3
commit 40da84393c

View File

@@ -63,11 +63,17 @@ class NormalizedIntersimpleExpert(IntersimpleExpert):
action, _ = super().predict(*args, **kwargs)
return self._intersimple._normalize(action), None
class DummyVecEnvPolicy():
class DummyVecEnvPolicy(BasePolicy):
def __init__(self, experts):
self._experts = [e() for e in experts]
def forward(self, *args, **kwargs):
raise NotImplementedError()
def _predict(self, *args, **kwargs):
raise NotImplementedError()
def predict(self, *args, **kwargs):
predictions = [e.predict() for e in self._experts]
actions = [p[0] for p in predictions]