Skip to content

Commit 1437963

Browse files
authored
Merge pull request #59 from AdrienBolling/main
Missing arg in log_all_multi_policy_metrics
2 parents 0578316 + fe1fddc commit 1437963

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

momaland/learning/cooperative_momappo/continuous_momappo.py

+3
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ def parse_args():
9797
help="the activation function for the neural networks")
9898
parser.add_argument("--anneal-lr", type=lambda x: bool(strtobool(x)), default=True, nargs="?", const=True,
9999
help="whether to anneal the learning rate linearly")
100+
parser.add_argument("--n-sample-weights", type=int, default=10,
101+
help="number of weights to sample for EUM and MUL computation")
100102

101103
args = parser.parse_args()
102104
# fmt: on
@@ -594,6 +596,7 @@ def _env_step(runner_state):
594596
hv_ref_point=np.array(args.ref_point),
595597
reward_dim=reward_dim,
596598
global_step=weight_number * args.timesteps_per_weight,
599+
n_sample_weights=args.n_sample_weights,
597600
)
598601
if args.save_policies:
599602
save_actor(actor_state, w, args)

momaland/learning/cooperative_momappo/discrete_momappo.py

+3
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ def parse_args():
9898
help="the activation function for the neural networks")
9999
parser.add_argument("--anneal-lr", type=lambda x: bool(strtobool(x)), default=True, nargs="?", const=True,
100100
help="whether to anneal the learning rate linearly")
101+
parser.add_argument("--n-sample-weights", type=int, default=10,
102+
help="number of weights to sample for EUM and MUL computation")
101103

102104
args = parser.parse_args()
103105
# fmt: on
@@ -590,6 +592,7 @@ def _env_step(runner_state):
590592
hv_ref_point=np.array(args.ref_point),
591593
reward_dim=reward_dim,
592594
global_step=weight_number * args.timesteps_per_weight,
595+
n_sample_weights=args.n_sample_weights,
593596
)
594597
if args.save_policies:
595598
save_actor(actor_state, w, args)

0 commit comments

Comments
 (0)