Example #1
0
def read_recommender_description(filepath):
    """
    Read a recommender model description from file after it has
    been saved by save_recommender(), without loading all the
    associated data into memory.

    Parameters
    ----------
    filepath : str
        The filepath to read from.
    """
    return BaseRecommender.read_recommender_description(filepath)
def check_read_description(r):
    f, path = tempfile.mkstemp(suffix='.npz')
    r.save(path)
    d = BaseRecommender.read_recommender_description(path)
    assert_equal(str(r), d)
Example #3
0
def check_read_description(r):
    f,path = tempfile.mkstemp(suffix='.npz')
    r.save(path)
    d = BaseRecommender.read_recommender_description(path)
    assert_equal(str(r),d)