def register(cls, id, entry_point, **kwargs): if id in Experience.experience.keys(): raise Exception('Cannot re-register id: {}'.format(id)) Experience.experience[id] = ClassSpec(id, entry_point, **kwargs)
def register(cls, id, entry_point, **kwargs): if id in ExplorationProcess.process.keys(): raise Exception('Cannot re-register id: {}'.format(id)) ExplorationProcess.process[id] = ClassSpec(id, entry_point, **kwargs)
def register(cls, id, entry_point, **kwargs): if id in Agent.agents.keys(): raise Exception('Cannot re-register id: {}'.format(id)) Agent.agents[id] = ClassSpec(id, entry_point, **kwargs)
def register(cls, id, entry_point, **kwargs): if id in Policy.policy.keys(): raise Exception("Cannot re-register id: {}".format(id)) Policy.policy[id] = ClassSpec(id, entry_point, **kwargs)
def register(cls, id, entry_point, **kwargs): if id in Model.model.keys(): raise Exception('Cannot re-register id: {}'.format(id)) Model.model[id] = ClassSpec(id, entry_point, **kwargs)