From 96bd6b9085c501f3cbd5b5fe5c5e6b0a3bd7a9ab Mon Sep 17 00:00:00 2001 From: amazingDD <1172392977@gmail.com> Date: Thu, 28 Jul 2022 17:32:48 +0800 Subject: [PATCH] update 2.1.1 --- README.md | 10 +++++----- daisy/__init__.py | 2 +- daisy/model/__init__.py | 12 ++++++++++++ daisy/utils/config.py | 9 +++++++-- run_examples/{fair_rec.py => test.py} | 0 run_examples/{fair_hpo.py => tune.py} | 0 setup.py | 4 ++-- 7 files changed, 27 insertions(+), 10 deletions(-) rename run_examples/{fair_rec.py => test.py} (100%) rename run_examples/{fair_hpo.py => tune.py} (100%) diff --git a/README.md b/README.md index 141cdb8..f3c75d5 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

![PyPI - Python Version](https://img.shields.io/badge/pyhton-3.5%2B-blue) -[![Version](https://img.shields.io/badge/version-2.1.0-orange)](https://github.com/AmazingDD/daisyRec) +[![Version](https://img.shields.io/badge/version-2.1.1-orange)](https://github.com/AmazingDD/daisyRec) ![GitHub repo size](https://img.shields.io/github/repo-size/AmazingDD/daisyRec) ![GitHub](https://img.shields.io/github/license/AmazingDD/daisyRec) [![arXiv](https://img.shields.io/badge/arXiv-daisyRec-%23B21B1B)](https://arxiv.org/abs/2206.10848) @@ -39,12 +39,12 @@ pip install daisyRec git clone https://github.com/AmazingDD/daisyRec.git && cd daisyRec ``` -- Example codes are listed in `run_examples`, try to refer them and find out how to use daisy; you can also implement these codes by moving them into `daisy/` +- Example codes are listed in `run_examples`, try to refer them and find out how to use daisy; you can also implement these codes by moving them into `daisyRec/`. ``` - python fair_rec.py - python fair_hpo.py + python test.py + python tune.py ``` -- The GUI Command Generator for `fair_rec.py` and `fair_hpo.py`, which can assist you to quikly write arguments and run the fair comparison experiments, is now available [**here**](http://DaisyRecGuiCommandGenerator.pythonanywhere.com). +- The GUI Command Generator for `test.py` and `tune.py`, which can assist you to quikly write arguments and run the fair comparison experiments, is now available [**here**](http://DaisyRecGuiCommandGenerator.pythonanywhere.com). ### Documentation diff --git a/daisy/__init__.py b/daisy/__init__.py index 87cc967..73f37a5 100644 --- a/daisy/__init__.py +++ b/daisy/__init__.py @@ -1 +1 @@ -__version__ = 'v2.1.0' +__version__ = 'v2.1.1' diff --git a/daisy/model/__init__.py b/daisy/model/__init__.py index e69de29..056d311 100644 --- a/daisy/model/__init__.py +++ b/daisy/model/__init__.py @@ -0,0 +1,12 @@ +from daisy.model.EASERecommender import EASE +from daisy.model.FMRecommender import FM +from daisy.model.Item2VecRecommender import Item2Vec +from daisy.model.KNNCFRecommender import ItemKNNCF, UserKNNCF +from daisy.model.MFRecommender import MF +from daisy.model.NeuMFRecommender import NeuMF +from daisy.model.NFMRecommender import NFM +from daisy.model.NGCFRecommender import NGCF +from daisy.model.PopRecommender import MostPop +from daisy.model.PureSVDRecommender import PureSVD +from daisy.model.SLiMRecommender import SLiM +from daisy.model.VAECFRecommender import VAECF \ No newline at end of file diff --git a/daisy/utils/config.py b/daisy/utils/config.py index 59e303c..fb86bb7 100644 --- a/daisy/utils/config.py +++ b/daisy/utils/config.py @@ -46,14 +46,19 @@ def init_config(param_dict=None): summarize hyper-parameter part (basic yaml + args + model yaml) ''' config = dict() - basic_conf = yaml.load(open('./daisy/config/basic.yaml'), Loader=yaml.loader.SafeLoader) + + current_path = os.path.dirname(os.path.realpath(__file__)) + basic_init_file = os.path.join(current_path, '../config/basic.yaml') + + basic_conf = yaml.load(open(basic_init_file), Loader=yaml.loader.SafeLoader) config.update(basic_conf) args = parse_args() algo_name = config['algo_name'] if args.algo_name is None else args.algo_name + model_init_file = os.path.join(current_path, f'../config/model/{algo_name}.yaml') model_conf = yaml.load( - open(f'./daisy/config/model/{algo_name}.yaml'), Loader=yaml.loader.SafeLoader) + open(model_init_file), Loader=yaml.loader.SafeLoader) config.update(model_conf) args_conf = vars(args) diff --git a/run_examples/fair_rec.py b/run_examples/test.py similarity index 100% rename from run_examples/fair_rec.py rename to run_examples/test.py diff --git a/run_examples/fair_hpo.py b/run_examples/tune.py similarity index 100% rename from run_examples/fair_hpo.py rename to run_examples/tune.py diff --git a/setup.py b/setup.py index 52913eb..99bf4d3 100644 --- a/setup.py +++ b/setup.py @@ -40,14 +40,14 @@ name='daisyRec', packages=[package for package in find_packages() if package.startswith('daisy')], # packages = find_packages(exclude=['tests*']), - version='v2.1.0', # Ideally should be same as your GitHub release tag varsion + version='v2.1.1', # Ideally should be same as your GitHub release tag varsion description=('An easy-to-use library for recommender systems.'), long_description=long_description, # long_description_content_type="text/markdown", author='Yu Di', author_email='di.yu.2021@mitb.smu.edu.sg', url='https://github.com/AmazingDD/daisyRec', - download_url='https://github.com/AmazingDD/daisyRec/archive/refs/tags/v2.1.0.tar.gz', + download_url='https://github.com/AmazingDD/daisyRec/archive/refs/tags/v2.1.1.tar.gz', keywords=['ranking', 'recommendation'], include_package_data=True, install_requires=install_requires,