@classmethod
def model_exists(cls, model_path):
    """
        Returns whether a trained model of this name or path exists.
        If `model_path` is the path to an existing directory, this
        directory is checked.
        Otherwise, a model by that name is searched for in the repository's
        `models` directory.
        """
    _, directory = cls._resolve_model(model_path)
    return directory.is_dir()
