Commit 4eb95a5d authored by Yuxin Wu's avatar Yuxin Wu

call predictor with multiple args

parent ca7d5cab
...@@ -14,7 +14,10 @@ Models are available for the following gym atari environments (click links for v ...@@ -14,7 +14,10 @@ Models are available for the following gym atari environments (click links for v
+ [Asterix-v0](https://gym.openai.com/evaluations/eval_mees2c58QfKm5GspCjRfCA) + [Asterix-v0](https://gym.openai.com/evaluations/eval_mees2c58QfKm5GspCjRfCA)
+ [Asteroids-v0](https://gym.openai.com/evaluations/eval_8eHKsRL4RzuZEq9AOLZA) + [Asteroids-v0](https://gym.openai.com/evaluations/eval_8eHKsRL4RzuZEq9AOLZA)
+ [Atlantis-v0](https://gym.openai.com/evaluations/eval_Z1B3d7A1QCaQk1HpO1Rg) + [Atlantis-v0](https://gym.openai.com/evaluations/eval_Z1B3d7A1QCaQk1HpO1Rg)
+ [BattleZone-v0](https://gym.openai.com/evaluations/eval_SoLit2bR1qmFoC0AsJF6Q)
+ [BeamRider-v0](https://gym.openai.com/evaluations/eval_KuOYumrjQjixwL0spG0iCA)
+ [Breakout-v0](https://gym.openai.com/evaluations/eval_L55gczPrQJamMGihq9tzA) + [Breakout-v0](https://gym.openai.com/evaluations/eval_L55gczPrQJamMGihq9tzA)
+ [CrazyClimber-v0](https://gym.openai.com/evaluations/eval_bKeBg0QwSgOm6A0I0wDhSw)
+ [DemonAttack-v0](https://gym.openai.com/evaluations/eval_tt21vVaRCKYzWFcg1Kw) + [DemonAttack-v0](https://gym.openai.com/evaluations/eval_tt21vVaRCKYzWFcg1Kw)
+ [DoubleDunk-v0](https://gym.openai.com/evaluations/eval_FI1GpF4TlCuf29KccTpQ) + [DoubleDunk-v0](https://gym.openai.com/evaluations/eval_FI1GpF4TlCuf29KccTpQ)
+ [ElevatorAction-v0](https://gym.openai.com/evaluations/eval_SqeAouMvR0icRivx2xprZg) + [ElevatorAction-v0](https://gym.openai.com/evaluations/eval_SqeAouMvR0icRivx2xprZg)
......
...@@ -23,7 +23,15 @@ class PredictorBase(object): ...@@ -23,7 +23,15 @@ class PredictorBase(object):
return_input return_input
""" """
def __call__(self, dp): def __call__(self, *args):
"""
if len(args) == 1, assume args[0] is a datapoint (a list)
else, assume args is a datapoinnt
"""
if len(args) != 1:
dp = args
else:
dp = args[0]
output = self._do_call(dp) output = self._do_call(dp)
if self.return_input: if self.return_input:
return (dp, output) return (dp, output)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment