Skip to content

Commit

Permalink
Adding polynet config
Browse files Browse the repository at this point in the history
  • Loading branch information
ahottung committed Jun 3, 2024
1 parent 9ff903f commit ce84153
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
43 changes: 43 additions & 0 deletions configs/experiment/routing/polynet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# @package _global_

defaults:
- override /model: polynet.yaml
- override /env: tsp.yaml
- override /callbacks: default.yaml
- override /trainer: default.yaml
- override /logger: wandb.yaml

env:
generator_params:
num_loc: 50

logger:
wandb:
project: "rl4co"
tags: ["polynet", "${env.name}"]
group: "${env.name}${env.generator_params.num_loc}"
name: "polynet-${env.name}${env.generator_params.num_loc}-${model.k}"

model:
k: 100
val_num_solutions: ${model.k}
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
optimizer_kwargs:
lr: 1e-4
weight_decay: 1e-6
lr_scheduler:
"MultiStepLR"
lr_scheduler_kwargs:
milestones: [80, 95]
gamma: 0.1

trainer:
max_epochs: 100

seed: 1234

11 changes: 11 additions & 0 deletions configs/model/polynet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
_target_: rl4co.models.PolyNet

# During val/test only we apply dihedral transformations
num_augment: 8

metrics:
train: ["loss", "reward"]
val: ["reward", "max_reward", "max_aug_reward"]
test: ${model.metrics.val}
log_on_step: True

0 comments on commit ce84153

Please sign in to comment.