Skip to content

Commit

Permalink
update config
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidZWZ committed Jul 29, 2024
1 parent b206b60 commit 7fd35a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ LightGODE/

Amazon-Beauty
```
python run_recbole.py -m LightGODE -d amazon-beauty
python run_recbole.py -m LightGODE -d amazon-beauty -t 1.8 -g 0.5
```

Amazon-Toys-and-Games
```
python run_recbole.py -m LightGODE -d amazon-toys-games
python run_recbole.py -m LightGODE -d amazon-toys-games -t 0.8 -g 0.5 -w 0
```

Gowalla
```
python run_recbole.py -m LightGODE -d gowalla -w 0
python run_recbole.py -m LightGODE -d gowalla -t 3 -g 10 -w 0
```

## Acknowledgement
Expand Down
6 changes: 5 additions & 1 deletion recbole/config/configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ def _update_parser(self):
self.final_config_dict["suffix"] = str(self.args.suffix)
if self.args.weight_decay != self.final_config_dict["weight_decay"]:
self.final_config_dict["weight_decay"] = float(self.args.weight_decay)

if self.args.tem:
self.final_config_dict["t"] = float(self.args.tem)
if self.args.gamma:
self.final_config_dict["gamma"] = float(self.args.gamma)

def _init_parameters_category(self):
self.parameters = dict()
self.parameters["General"] = general_arguments
Expand Down
3 changes: 2 additions & 1 deletion run_recbole.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
parser = argparse.ArgumentParser()
parser.add_argument("--model", "-m", type=str, default="BPR", help="name of models")
parser.add_argument("--dataset", "-d", type=str, default="ml-100k", help="name of datasets")
parser.add_argument('--gpu', '-g', type=str, default='0', help='gpu id')
parser.add_argument('--gpu', type=str, default='0', help='gpu id')
parser.add_argument('--lr', '-l', type=float, default=0.001, help='learing rate')
parser.add_argument('--weight_decay', '-w', type=float, default=1e-8, help='weight decay')
parser.add_argument('--tem', '-t', type=float, default=None, help='temperature')
parser.add_argument('--gamma', '-g', type=float, default=None, help='gamma')
parser.add_argument('--suffix', '-s', type=str, default=None, help='suffix logger')
parser.add_argument("--config_files", type=str, default=None, help="config files")
parser.add_argument("--run", '-r', type=str, default=None, help="config files")
Expand Down

0 comments on commit 7fd35a3

Please sign in to comment.