Skip to content

Commit

Permalink
Resolve conflicts with main: changes to policy base
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhernandezgarcia committed Dec 8, 2023
2 parents 4390b17 + 15e77fa commit 08351bb
Show file tree
Hide file tree
Showing 43 changed files with 5,549 additions and 323 deletions.
2 changes: 1 addition & 1 deletion config/env/ccube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ n_dim: 2
kappa: 1e-3
# Policy
min_incr: 0.1
n_comp: 1
n_comp: 2
epsilon: 1e-6
beta_params_min: 0.1
beta_params_max: 100.0
Expand Down
27 changes: 27 additions & 0 deletions config/env/crystals/ccrystal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
defaults:
- base

_target_: gflownet.envs.crystals.ccrystal.CCrystal

# Composition config
id: ccrystal
composition_kwargs:
elements: 89
# Lattice parameters config
lattice_parameters_kwargs:
min_length: 1.0
max_length: 350.0
min_angle: 50.0
max_angle: 150.0
# Space group config
space_group_kwargs:
space_groups_subset: null
# Stoichiometry <-> space group check
do_composition_to_sg_constraints: True
self.do_sg_to_lp_constraints: True

# Buffer
buffer:
data_path: null
train: null
test: null
43 changes: 43 additions & 0 deletions config/env/crystals/clattice_parameters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
defaults:
- base

_target_: gflownet.envs.crystals.clattice_parameters.CLatticeParameters

id: clattice_parameters

# Lattice system
lattice_system: triclinic
# Allowed ranges of size and angles
min_length: 1.0
max_length: 350.0
min_angle: 50.0
max_angle: 150.0

# Policy
min_incr: 0.1
n_comp: 2
epsilon: 1e-6
beta_params_min: 0.1
beta_params_max: 100.0
fixed_distribution:
beta_weights: 1.0
beta_alpha: 10.0
beta_beta: 10.0
bernoulli_bts_prob: 0.1
bernoulli_eos_prob: 0.1
random_distribution:
beta_weights: 1.0
beta_alpha: 10.0
beta_beta: 10.0
bernoulli_bts_prob: 0.1
bernoulli_eos_prob: 0.1

# Buffer
buffer:
data_path: null
train: null
test:
type: grid
n: 900
output_csv: clp_test.csv
output_pkl: clp_test.pkl
2 changes: 2 additions & 0 deletions config/env/crystals/crystal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ _target_: gflownet.envs.crystals.crystal.Crystal
id: crystal
composition_kwargs:
elements: 89
max_atoms: 20
max_atom_i: 16
lattice_parameters_kwargs:
min_length: 1.0
max_length: 5.0
Expand Down
23 changes: 11 additions & 12 deletions config/experiments/ccube/corners.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,17 @@ gflownet:
z_dim: 16
lr_z_mult: 100
n_train_steps: 10000
policy:
forward:
type: mlp
n_hid: 512
n_layers: 5
checkpoint: forward
backward:
type: mlp
n_hid: 512
n_layers: 5
shared_weights: False
checkpoint: backward

# Policy
policy:
forward:
type: mlp
n_hid: 128
n_layers: 2
checkpoint: forward
backward:
shared_weights: True
checkpoint: backward

# WandB
logger:
Expand Down
145 changes: 145 additions & 0 deletions config/experiments/ccube/hyperparams_search_20230920_batch1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# Shared config
shared:
slurm: {}
script:
user: $USER
device: cpu
logger:
project_name: cube
do:
online: True
test:
period: 500
n: 900
checkpoints:
period: 10000
# Contiunuous Cube environment
env:
__value__: ccube
n_dim: 2
# Buffer
buffer:
data_path: null
train: null
test:
type: grid
n: 1000
output_csv: ccube_test.csv
output_pkl: ccube_test.pkl
# Proxy
proxy: corners
# GFlowNet config
gflownet:
__value__: trajectorybalance
random_action_prob: 0.1
optimizer:
batch_size:
forward: 100
lr: 0.0001
z_dim: 16
lr_z_mult: 100
n_train_steps: 10000
# Policy
+gflownet:
policy:
forward:
type: mlp
n_hid: 512
n_layers: 5
checkpoint: forward
# Use + to add new variables
+gflownet:
policy:
backward:
type: mlp
n_hid: 512
n_layers: 5
checkpoint: backward
shared_weights: False

# Jobs
jobs:
- slurm:
job_name: pigeonish
script:
env:
__value__: ccube
n_comp: 5
beta_params_min: 0.01
beta_params_max: 100.0
random_distr_params:
beta_weights: 1.0
beta_alpha: 100.0
beta_beta: 100.0
bernoulli_eos_prob: 0.7311
bernoulli_bts_prob: 0.7311
- slurm:
job_name: finch
script:
env:
__value__: ccube
n_comp: 5
beta_params_min: 0.1
beta_params_max: 100.0
random_distr_params:
beta_weights: 1.0
beta_alpha: 100.0
beta_beta: 100.0
bernoulli_eos_prob: 0.7311
bernoulli_bts_prob: 0.7311
- slurm:
job_name: dove
script:
env:
__value__: ccube
n_comp: 5
beta_params_min: 1
beta_params_max: 100.0
random_distr_params:
beta_weights: 1.0
beta_alpha: 100.0
beta_beta: 100.0
bernoulli_eos_prob: 0.7311
bernoulli_bts_prob: 0.7311
- slurm:
job_name: pine
script:
env:
__value__: ccube
n_comp: 5
beta_params_min: 0.01
beta_params_max: 1000.0
random_distr_params:
beta_weights: 1.0
beta_alpha: 100.0
beta_beta: 100.0
bernoulli_eos_prob: 0.7311
bernoulli_bts_prob: 0.7311
- slurm:
job_name: spruce
script:
env:
__value__: ccube
n_comp: 5
beta_params_min: 0.1
beta_params_max: 1000.0
random_distr_params:
beta_weights: 1.0
beta_alpha: 100.0
beta_beta: 100.0
bernoulli_eos_prob: 0.7311
bernoulli_bts_prob: 0.7311
- slurm:
job_name: fir
script:
env:
__value__: ccube
n_comp: 5
beta_params_min: 1
beta_params_max: 1000.0
random_distr_params:
beta_weights: 1.0
beta_alpha: 100.0
beta_beta: 100.0
bernoulli_eos_prob: 0.7311
bernoulli_bts_prob: 0.7311
Loading

0 comments on commit 08351bb

Please sign in to comment.