Skip to content

Commit

Permalink
[Configs] updated configs
Browse files Browse the repository at this point in the history
  • Loading branch information
fedebotu committed Aug 22, 2023
1 parent 129acfc commit d31d661
Show file tree
Hide file tree
Showing 8 changed files with 172 additions and 10 deletions.
14 changes: 14 additions & 0 deletions configs/experiment/routing/am-critic.yaml
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"
50 changes: 50 additions & 0 deletions configs/experiment/routing/am-ppo.yaml
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"]
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,29 @@ logger:
project: "rl4co"
tags: ["am", "${env.name}"]
group: ${env.name}${env.num_loc}"
name: "am-${env.name}${env.num_loc}"

name: "am-xl-${env.name}${env.num_loc}"

model:
batch_size: 512
policy_kwargs:
num_encoder_layers: 6
normalization: 'instance'
batch_size: 2048
val_batch_size: 1024
test_batch_size: 1024
train_data_size: 1_280_000
val_data_size: 10_000
test_data_size: 10_000
optimizer_kwargs:
lr: 1e-4
weight_decay: 0
lr_scheduler:
"MultiStepLR"
lr_scheduler_kwargs:
milestones: [80, 95]
milestones: [480, 495]
gamma: 0.1

trainer:
max_epochs: 100
max_epochs: 500

seed: 1234

4 changes: 2 additions & 2 deletions configs/experiment/routing/am.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ logger:
wandb:
project: "rl4co"
tags: ["am", "${env.name}"]
group: ${env.name}${env.num_loc}"
name: "am-${env.name}${env.num_loc}"
group: ${env.name}${env.num_loc}
name: am-${env.name}${env.num_loc}

model:
batch_size: 512
Expand Down
38 changes: 38 additions & 0 deletions configs/experiment/routing/pomo.yaml
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

42 changes: 42 additions & 0 deletions configs/experiment/routing/symnco.yaml
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

11 changes: 10 additions & 1 deletion configs/model/pomo.yaml
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
10 changes: 8 additions & 2 deletions configs/model/symnco.yaml
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

0 comments on commit d31d661

Please sign in to comment.