settings.py 606 B

123456789101112131415161718192021222324252627282930313233
  1. import os
  2. DATASET_NAME = "movie_lens"
  3. COLUMN_DICT = None
  4. MOVIE_LENS_COLUMN_DICT = {
  5. "item": "movieId",
  6. "user": "userId",
  7. "rating": "rating"
  8. }
  9. # to override in user_settings.py
  10. PATH_TO_DATA = None
  11. PATH_TO_PROJECT = None
  12. # end of override
  13. PROJECT_PATH = os.path.dirname(__file__)
  14. try:
  15. from user_settings import * # silence pyflakes
  16. except ImportError:
  17. pass
  18. if DATASET_NAME is "movie_lens":
  19. COLUMN_DICT = MOVIE_LENS_COLUMN_DICT
  20. if COLUMN_DICT is not None:
  21. USER_COLUMN = COLUMN_DICT['user']
  22. ITEM_COLUMN = COLUMN_DICT['item']
  23. RATING_COLUMN = COLUMN_DICT['rating']