-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from kaist-silab/refac
`v0.1.0`
- Loading branch information
Showing
150 changed files
with
4,113 additions
and
2,813 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,12 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
# set target (e.g. 60%) to fail the build if coverage is too low | ||
target: 60% | ||
patch: | ||
default: | ||
# basic just to show current patch | ||
target: auto | ||
threshold: 0% | ||
base: auto |
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,3 @@ | ||
# Refactored Experiments | ||
|
||
We made some major refactoring to RL4CO, so the older experiments versions will be updated to the more efficient standards. You may refer to the [older experiments](archive/README.md) to run the same as in our preprint. |
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,9 @@ | ||
# Older experiment versions | ||
|
||
These experiments are the ones we ran in the first version of our paper. The only difference is that, from version `0.1.0`, we added several new features and made a major refactoring that simplifies our codebase! | ||
|
||
We will update the experiments with the refactored versions. To use these, you may use RL4CO no greater than version `0.0.6`: | ||
|
||
```bash | ||
pip install rl4co<=0.0.6 | ||
``` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ logger: | |
tags: ${tags} | ||
group: "dpp" | ||
name: "am" | ||
|
||
seed: 12345 | ||
|
||
env: | ||
|
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ logger: | |
tags: ${tags} | ||
group: "mtsp${env.num_loc}" | ||
name: "am" | ||
|
||
seed: 12345 | ||
|
||
env: | ||
|
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 |
---|---|---|
|
@@ -29,7 +29,7 @@ env: | |
num_loc: 20 | ||
min_num_agents: 5 | ||
max_num_agents: 5 | ||
|
||
trainer: | ||
min_epochs: 10 | ||
max_epochs: 100 | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,46 @@ | ||
# @package _global_ | ||
|
||
defaults: | ||
- override /model: am.yaml | ||
- override /env: tsp.yaml | ||
- override /callbacks: default.yaml | ||
- override /trainer: default.yaml | ||
# - override /logger: null # comment this line to enable logging | ||
- override /logger: wandb.yaml | ||
|
||
env: | ||
num_loc: 50 | ||
|
||
tags: ["am", "tsp"] | ||
|
||
logger: | ||
wandb: | ||
project: "rl4co" | ||
tags: ${tags} | ||
group: "tsp${env.num_loc}" | ||
name: "am-tsp${env.num_loc}" | ||
|
||
seed: 12345 | ||
|
||
trainer: | ||
max_epochs: 100 | ||
gradient_clip_val: 1.0 | ||
accelerator: "gpu" | ||
precision: "16-mixed" | ||
|
||
train: | ||
optimizer: | ||
_target_: torch.optim.Adam | ||
lr: 1e-4 | ||
weight_decay: 0 | ||
scheduler: | ||
_target_: torch.optim.lr_scheduler.MultiStepLR | ||
milestones: [80, 95] | ||
gamma: 0.1 | ||
scheduler_interval: epoch | ||
|
||
data: | ||
batch_size: 512 | ||
train_size: 1_280_000 | ||
val_size: 10_000 | ||
|
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ logger: | |
tags: ${tags} | ||
group: "tsp${env.num_loc}" | ||
name: "mdam" | ||
|
||
seed: 12345 | ||
|
||
env: | ||
|
File renamed without changes.
File renamed without changes.
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,47 @@ | ||
# @package _global_ | ||
# Example configuration for experimenting. Trains the Attention Model on | ||
# the TSP environment with 50 locations via REINFORCE with greedy rollout baseline. | ||
# You may find comments on the most common hyperparameters below. | ||
|
||
# Override defaults: take configs from relative path | ||
defaults: | ||
- override /model: am.yaml | ||
- override /env: tsp.yaml | ||
- override /callbacks: default.yaml | ||
- override /trainer: default.yaml | ||
# - override /logger: null # comment this line to enable logging | ||
- override /logger: wandb.yaml | ||
|
||
# Environment configuration | ||
# Note that here we load by default the `.npz` files for the TSP environment | ||
# that are automatically generated with seed following Kool et al. (2019). | ||
env: | ||
num_loc: 50 | ||
data_dir: ${paths.root_dir}/data/tsp | ||
val_file: tsp${env.num_loc}_val_seed4321.npz | ||
test_file: tsp${env.num_loc}_test_seed1234.npz | ||
|
||
# Logging: we use Wandb in this case | ||
logger: | ||
wandb: | ||
project: "rl4co" | ||
tags: ["am", "tsp"] | ||
group: "tsp${env.num_loc}" | ||
name: "am-tsp${env.num_loc}" | ||
|
||
# Model: this contains the environment (which gets automatically passed to the model on | ||
# initialization), the policy network and other hyperparameters. | ||
# This is a `LightningModule` and can be trained with PyTorch Lightning. | ||
model: | ||
batch_size: 512 | ||
train_data_size: 1_280_000 | ||
val_data_size: 10_000 | ||
test_data_size: 10_000 | ||
optimizer_kwargs: | ||
lr: 1e-4 | ||
|
||
# Trainer: this is a customized version of the PyTorch Lightning trainer. | ||
trainer: | ||
max_epochs: 100 | ||
|
||
seed: 1234 |
Oops, something went wrong.