Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhernandezgarcia committed May 28, 2024
2 parents 4c6efa0 + bcb1443 commit 92d45b7
Show file tree
Hide file tree
Showing 53 changed files with 2,332 additions and 655 deletions.
26 changes: 7 additions & 19 deletions config/env/base.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
_target_: gflownet.envs.base.GFlowNetEnv

# Reward function: power or boltzmann
# boltzmann: exp(-1.0 * reward_beta * proxy)
# power: (-1.0 * proxy / reward_norm) ** self.reward_beta
# identity: proxy
reward_func: identity
# Minimum reward
reward_min: 1e-8
# Beta parameter of the reward function
reward_beta: 1.0
# Reward normalization for "power" reward function
reward_norm: 1.0
# If > 0, reward_norm = reward_norm_std_mult * std(energies)
reward_norm_std_mult: 0.0
proxy_state_format: oracle
env_id: "env"
# Policy distribution parameters
fixed_distr_params: null
random_distr_params: null
# Check if action valid with mask before step
skip_mask_check: False
# Whether the environment has conditioning variables
conditional: False
# Whether the environment is continuous
continuous: False
# Buffer
# Buffer: no train and test buffers by default
buffer:
replay_capacity: 0
train:
path: null
test:
path: null
train: null
test: null
6 changes: 5 additions & 1 deletion config/env/tetris.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@ allow_eos_before_full: False
buffer:
data_path: null
train: null
test: null
test:
type: random
n: 10
output_csv: tetris_test.csv
output_pkl: tetris_test.pkl

1 change: 0 additions & 1 deletion config/experiments/ccube/corners.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ env:
beta_beta: 10.0
bernoulli_eos_prob: 0.1
bernoulli_bts_prob: 0.1
reward_func: identity

# GFlowNet hyperparameters
gflownet:
Expand Down
1 change: 0 additions & 1 deletion config/experiments/ccube/uniform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ env:
beta_beta: 10.0
bernoulli_eos_prob: 0.1
bernoulli_bts_prob: 0.1
reward_func: identity

# GFlowNet hyperparameters
gflownet:
Expand Down
1 change: 0 additions & 1 deletion config/experiments/clatticeparams/clatticeparams_owl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ env:
beta_beta: 0.01
bernoulli_source_logit: 1.0
bernoulli_eos_logit: 1.0
reward_func: identity

# GFlowNet hyperparameters
gflownet:
Expand Down
7 changes: 5 additions & 2 deletions config/experiments/crystals/albatross.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ env:
beta_beta: 10.0
bernoulli_eos_prob: 0.1
bernoulli_bts_prob: 0.1
reward_func: boltzmann
reward_beta: 8
buffer:
replay_capacity: 0
test:
Expand All @@ -52,6 +50,11 @@ env:
output_csv: ccrystal_val.csv
output_pkl: ccrystal_val.pkl

# Proxy
proxy:
reward_function: exponential
beta: 8

# GFlowNet hyperparameters
gflownet:
random_action_prob: 0.1
Expand Down
7 changes: 5 additions & 2 deletions config/experiments/crystals/albatross_sg_first.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ env:
beta_beta: 10.0
bernoulli_eos_prob: 0.1
bernoulli_bts_prob: 0.1
reward_func: boltzmann
reward_beta: 8
buffer:
replay_capacity: 0
test:
Expand All @@ -54,6 +52,11 @@ env:
output_csv: ccrystal_val.csv
output_pkl: ccrystal_val.pkl

# Proxy
proxy:
reward_function: exponential
beta: 8

# GFlowNet hyperparameters
gflownet:
random_action_prob: 0.1
Expand Down
7 changes: 5 additions & 2 deletions config/experiments/crystals/lattice_parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ defaults:

# Environment
env:
reward_func: boltzmann
reward_beta: 0.3
buffer:
replay_capacity: 1000

# Proxy
proxy:
reward_function: exponential
beta: 0.3

# GFlowNet hyperparameters
gflownet:
random_action_prob: 0.1
Expand Down
7 changes: 5 additions & 2 deletions config/experiments/crystals/pigeon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ env:
beta_beta: 10.0
bernoulli_eos_prob: 0.1
bernoulli_bts_prob: 0.1
reward_func: boltzmann
reward_beta: 8
buffer:
replay_capacity: 0
test:
Expand All @@ -56,6 +54,11 @@ env:
output_csv: ccrystal_val.csv
output_pkl: ccrystal_val.pkl

# Proxy
proxy:
reward_function: exponential
beta: 8

# GFlowNet hyperparameters
gflownet:
random_action_prob: 0.1
Expand Down
1 change: 0 additions & 1 deletion config/experiments/icml23/ctorus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ env:
n_dim: 2
length_traj: 10
n_comp: 5
reward_func: identity
vonmises_min_concentration: 4
policy_encoding_dim_per_angle: 10

Expand Down
1 change: 0 additions & 1 deletion config/experiments/icml23/dtorus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ env:
n_dim: 2
n_angles: 20
length_traj: 20
reward_func: identity

# Proxy
proxy:
Expand Down
1 change: 0 additions & 1 deletion config/experiments/icml23/htorus.dryrun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ defaults:
env:
n_dim: 2
length_traj: 5
reward_func: identity

# Proxy
proxy:
Expand Down
1 change: 0 additions & 1 deletion config/experiments/icml23/htorus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ defaults:
env:
n_dim: 2
length_traj: 20
reward_func: identity

# Proxy
proxy:
Expand Down
7 changes: 5 additions & 2 deletions config/experiments/neurips23/crystal-comp-sg-lp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ env:
grid_size: 10
composition_kwargs:
elements: 89
reward_func: boltzmann
reward_beta: 1

# Proxy
proxy:
reward_function: exponential
beta: 1

# GFlowNet hyperparameters
gflownet:
Expand Down
1 change: 0 additions & 1 deletion config/experiments/scrabble/jay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ env:
n: 1000
output_csv: scrabble_test.csv
output_pkl: scrabble_test.pkl
reward_func: identity

# Proxy
proxy:
Expand Down
1 change: 0 additions & 1 deletion config/experiments/scrabble/penguin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ env:
n: 1000
output_csv: scrabble_test.csv
output_pkl: scrabble_test.pkl
reward_func: identity

# Proxy
proxy:
Expand Down
8 changes: 5 additions & 3 deletions config/experiments/simple_tetris.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ defaults:
- override /logger: wandb

env:
reward_func: boltzmann
reward_beta: 10.0
width: 4
height: 4
pieces: ["I", "O", "J", "L", "T"]
Expand All @@ -22,6 +20,10 @@ env:
output_pkl: simple_tetris_val.pkl
n: 100

proxy:
reward_function: exponential
beta: 10

gflownet:
random_action_prob: 0.3
optimizer:
Expand All @@ -44,4 +46,4 @@ device: cpu
logger:
do:
online: True
project_name: simple_tetris
project_name: simple_tetris
7 changes: 5 additions & 2 deletions config/experiments/tree.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ env:
continuous: False
policy_format: mlp
threshold_components: 3
reward_func: boltzmann
reward_beta: 32
test_args:
top_k_trees: 100
buffer:
replay_capacity: 100

# Proxy
proxy:
reward_function: exponential
beta: 32

# GFlowNet hyperparameters
gflownet:
random_action_prob: 0.1
Expand Down
7 changes: 5 additions & 2 deletions config/experiments/workshop23/discrete-matbench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ env:
grid_size: 10
composition_kwargs:
elements: [1,3,4,5,6,7,8,9,11,12,13,14,15,16,17,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,89,90,91,92,93,94]
reward_func: boltzmann
reward_beta: 1
buffer:
replay_capacity: 0

# Proxy
proxy:
reward_function: exponential
beta: 1

# GFlowNet hyperparameters
gflownet:
random_action_prob: 0.1
Expand Down
2 changes: 2 additions & 0 deletions config/logger/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ test:
logprobs_bootstrap_size: 10000
# Maximum number of test data points to compute log likelihood probs.
max_data_logprobs: 1e5
# Number of points to obtain a grid to estimate the reward density
n_grid: 40000
# Oracle metrics
oracle:
period: 100000
Expand Down
24 changes: 24 additions & 0 deletions config/proxy/base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
_target_: gflownet.proxy.base.Proxy

# Reward function: string identifier of the proxy-to-reward function:
# - identity (default)
# - absolute
# - power
# - exponential
# - shift
# - product
# Alternatively, it can be a callable of the function itself.
reward_function: identity
# A callable of the proxy-to-logreward function.
# None by default, which takes the log of the proxy-to-reward function
logreward_function: null
# Arguments of the proxy-to-reward function (beta):
# - power: R(x) = x ** beta
# - exponential: R(x) = exp(x * beta)
# - shift: R(x) = x + beta
# - product: R(x) = x * beta
reward_function_kwargs: {}
# Minimum reward. Used to clip the rewards.
reward_min: 0.0
# Flag to control whether rewards are clipped
do_clip_rewards: False
8 changes: 8 additions & 0 deletions config/proxy/corners.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
defaults:
- base

_target_: gflownet.proxy.corners.Corners

mu: 0.75
sigma: 0.05
higher_is_better: False
3 changes: 3 additions & 0 deletions config/proxy/crystals/dave.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
defaults:
- base

_target_: gflownet.proxy.crystals.dave.DAVE

release: 0.3.4
Expand Down
3 changes: 3 additions & 0 deletions config/proxy/crystals/lattice_parameters.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
defaults:
- base

_target_: gflownet.proxy.crystals.lattice_parameters.LatticeParameters

min_value: -100
3 changes: 3 additions & 0 deletions config/proxy/crystals/spacegroup.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
defaults:
- base

_target_: gflownet.proxy.crystals.spacegroup.SpaceGroup

normalize: True
3 changes: 3 additions & 0 deletions config/proxy/length.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
defaults:
- base

_target_: gflownet.proxy.aptamers.Aptamers

oracle_id: length
Expand Down
5 changes: 4 additions & 1 deletion config/proxy/molecule.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
defaults:
- base

_target_: gflownet.proxy.molecule.RFMoleculeEnergy

path_to_model: './data/random_forest_reward_100.pkl'
url_to_model: 'https://drive.google.com/uc?id=1OpQNC8WWIsMh8K4olfSaQRFlj3emYThF'
url_to_model: 'https://drive.google.com/uc?id=1OpQNC8WWIsMh8K4olfSaQRFlj3emYThF'
3 changes: 3 additions & 0 deletions config/proxy/scrabble.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
defaults:
- base

_target_: gflownet.proxy.scrabble.ScrabbleScorer

vocabulary_check: False
3 changes: 3 additions & 0 deletions config/proxy/tetris.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
defaults:
- base

_target_: gflownet.proxy.tetris.Tetris

normalize: True
Expand Down
3 changes: 3 additions & 0 deletions config/proxy/torus.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
defaults:
- base

_target_: gflownet.proxy.torus.Torus

normalize: True
Expand Down
3 changes: 3 additions & 0 deletions config/proxy/tree.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
defaults:
- base

_target_: gflownet.proxy.tree.TreeProxy

use_prior: False
3 changes: 3 additions & 0 deletions config/proxy/uniform.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
defaults:
- base

_target_: gflownet.proxy.uniform.Uniform
Loading

0 comments on commit 92d45b7

Please sign in to comment.