Skip to content

Commit

Permalink
Revert modelpath for environment to be related to datapath.
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl-Krauth committed Jun 29, 2022
1 parent 8546859 commit 57ac291
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion reclab/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

DATA_DIR = os.environ.get('RECLAB_DATA_PATH')
if DATA_DIR is None:
DATA_DIR = os.path.expanduser('~/recsys/data/')
DATA_DIR = os.path.dirname(__file__)

def read_dataset(name, shuffle=True, seed=0):
"""Read a dataset as specified by name.
Expand Down
2 changes: 1 addition & 1 deletion reclab/environments/latent_factors.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def __init__(self, name, latent_dim=128, datapath=data_utils.DATA_DIR, force_ret
max_num_users=np.inf, max_num_items=np.inf, **kwargs):
"""Create a ML100K Latent Factor environment."""
self.dataset_name = name
modelpath = os.path.join(os.path.dirname(__file__), '../../models')
modelpath = datapath
if name == 'ml-100k':
self.datapath = os.path.expanduser(os.path.join(datapath, 'ml-100k'))
self.modelpath = os.path.join(modelpath, 'ml-100k')
Expand Down

0 comments on commit 57ac291

Please sign in to comment.