-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
172 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# @package _global_ | ||
|
||
# Use the following to take the default values from am.yaml | ||
# Replace below only the values that you want to change compared to the default values | ||
defaults: | ||
- routing/am.yaml | ||
|
||
logger: | ||
wandb: | ||
tags: ["am-critic", "${env.name}"] | ||
name: am-critic-${env.name}${env.num_loc} | ||
|
||
model: | ||
baseline: "critic" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# @package _global_ | ||
|
||
defaults: | ||
- override /model: am-ppo.yaml | ||
- override /env: tsp.yaml | ||
- override /callbacks: default.yaml | ||
- override /trainer: default.yaml | ||
- override /logger: wandb.yaml | ||
|
||
env: | ||
num_loc: 50 | ||
|
||
logger: | ||
wandb: | ||
project: "rl4co" | ||
tags: ["am-ppo", "${env.name}"] | ||
group: ${env.name}${env.num_loc} | ||
name: am-${env.name}${env.num_loc} | ||
|
||
model: | ||
batch_size: 512 | ||
val_batch_size: 1024 | ||
test_batch_size: 1024 | ||
train_data_size: 1_280_000 | ||
val_data_size: 10_000 | ||
test_data_size: 10_000 | ||
clip_range: 0.2 | ||
ppo_epochs: 2 | ||
mini_batch_size: 512 | ||
vf_lambda: 0.5 | ||
entropy_lambda: 0.01 | ||
normalize_adv: False | ||
max_grad_norm: 0.5 | ||
optimizer_kwargs: | ||
lr: 1e-4 | ||
weight_decay: 0 | ||
lr_scheduler: | ||
"MultiStepLR" | ||
lr_scheduler_kwargs: | ||
milestones: [80, 95] | ||
gamma: 0.1 | ||
|
||
trainer: | ||
max_epochs: 100 | ||
gradient_clip_val: Null # not supported in manual optimization | ||
|
||
seed: 1234 | ||
|
||
metrics: | ||
train: ["loss", "reward", "surrogate_loss", "value_loss", "entropy_bonus"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# @package _global_ | ||
|
||
defaults: | ||
- override /model: pomo.yaml | ||
- override /env: tsp.yaml | ||
- override /callbacks: default.yaml | ||
- override /trainer: default.yaml | ||
- override /logger: wandb.yaml | ||
|
||
env: | ||
num_loc: 50 | ||
|
||
logger: | ||
wandb: | ||
project: "rl4co" | ||
tags: ["pomo", "${env.name}"] | ||
group: ${env.name}${env.num_loc}" | ||
name: "pomo-${env.name}${env.num_loc}" | ||
|
||
model: | ||
batch_size: 64 | ||
train_data_size: 160_000 | ||
val_data_size: 10_000 | ||
test_data_size: 10_000 | ||
optimizer_kwargs: | ||
lr: 1e-4 | ||
weight_decay: 1e-6 | ||
lr_scheduler: | ||
"MultiStepLR" | ||
lr_scheduler_kwargs: | ||
milestones: [95] | ||
gamma: 0.1 | ||
|
||
trainer: | ||
max_epochs: 100 | ||
|
||
seed: 1234 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# @package _global_ | ||
|
||
defaults: | ||
- override /model: symnco.yaml | ||
- override /env: tsp.yaml | ||
- override /callbacks: default.yaml | ||
- override /trainer: default.yaml | ||
- override /logger: wandb.yaml | ||
|
||
env: | ||
num_loc: 50 | ||
|
||
logger: | ||
wandb: | ||
project: "rl4co" | ||
tags: ["symnco", "${env.name}"] | ||
group: ${env.name}${env.num_loc}" | ||
name: "symnco-${env.name}${env.num_loc}" | ||
|
||
model: | ||
batch_size: 512 | ||
val_batch_size: 1024 | ||
test_batch_size: 1024 | ||
train_data_size: 1_280_000 | ||
val_data_size: 10_000 | ||
test_data_size: 10_000 | ||
num_starts: 0 # 0 for no augmentation for multi-starts | ||
num_augment: 10 | ||
optimizer_kwargs: | ||
lr: 1e-4 | ||
weight_decay: 0 | ||
lr_scheduler: | ||
"MultiStepLR" | ||
lr_scheduler_kwargs: | ||
milestones: [80, 95] | ||
gamma: 0.1 | ||
|
||
trainer: | ||
max_epochs: 100 | ||
|
||
seed: 1234 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
_target_: rl4co.models.POMO | ||
_target_: rl4co.models.POMO | ||
|
||
# During val/test only we apply dihedral transformations | ||
num_augment: 8 | ||
|
||
metrics: | ||
train: ["loss", "reward"] | ||
val: ["reward", "max_reward", "max_aug_reward"] | ||
test: ${metrics.val} | ||
log_on_step: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
_target_: rl4co.models.SymNCO | ||
|
||
num_augment: 8 | ||
num_starts: ${env.num_loc} | ||
num_augment: 10 | ||
num_starts: 0 # by default we use only symmetric augmentations | ||
|
||
metrics: | ||
train: ["loss", "loss_ss", "loss_ps", "loss_inv", "reward"] | ||
val: ["reward", "max_reward", "max_aug_reward"] | ||
test: ${metrics.val} | ||
log_on_step: True |