@classmethod
def load(cls, path, featurizer, max_history):
    if os.path.exists(path):
        meta_path = os.path.join(path, 'keras_policy.json')
        if os.path.isfile(meta_path):
            with io.open(meta_path) as f:
                meta = json.loads(f.read())
            model_arch = cls._load_model_arch(path, meta)
            return cls(cls._load_weights_for_model(path, model_arch, meta), current_epoch=meta['epochs'], max_history=max_history, featurizer=featurizer)
        else:
            return cls(max_history=max_history, featurizer=featurizer)
    else:
        raise Exception("Failed to load dialogue model. Path {} doesn't exist".format(os.path.abspath(path)))
@classmethod
def load(cls, path, featurizer, max_history):
    if os.path.exists(path):
        meta_path = os.path.join(path, 'keras_policy.json')
        if os.path.isfile(meta_path):
            with io.open(meta_path) as f:
                meta = json.loads(f.read())
            model_arch = cls._load_model_arch(path, meta)
            return cls(cls._load_weights_for_model(path, model_arch, meta), current_epoch=meta['epochs'], max_history=max_history, featurizer=featurizer)
        else:
            return cls(max_history=max_history, featurizer=featurizer)
    else:
        raise Exception("Failed to load dialogue model. Path {} doesn't exist".format(os.path.abspath(path)))