Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
albertbou92 committed Apr 24, 2024
1 parent 46c8caa commit 7a35ce8
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 32 deletions.
8 changes: 5 additions & 3 deletions acegen/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
__version__ = "1.0"

from acegen.models import models
from acegen.scoring_functions import custom_scoring_functions, register_custom_scoring_function

from acegen.models import (
create_gpt2_actor,
create_gpt2_actor_critic,
Expand All @@ -13,6 +10,11 @@
create_lstm_actor,
create_lstm_actor_critic,
create_lstm_critic,
models,
)
from acegen.rl_env.smiles_env import SMILESEnv
from acegen.scoring_functions import (
custom_scoring_functions,
register_custom_scoring_function,
)
from acegen.vocabulary.vocabulary import SMILESVocabulary
2 changes: 1 addition & 1 deletion scripts/a2c/config_denovo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ experiment_name: acegen
agent_name: a2c
log_dir: results
logger_backend: null # csv, wandb, tensorboard, or null
seed: 101
seed: 101 # multiple seeds can be provided as a list to multiple experiments sequentially e.g. [101, 102, 103]

# Environment configuration
num_envs: 16 # Number of smiles to generate in parallel
Expand Down
2 changes: 1 addition & 1 deletion scripts/a2c/config_fragment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ experiment_name: acegen
agent_name: a2c
log_dir: results
logger_backend: null # csv, wandb, tensorboard, or null
seed: 101
seed: 101 # multiple seeds can be provided as a list to multiple experiments sequentially e.g. [101, 102, 103]

# Environment configuration
num_envs: 16 # Number of smiles to generate in parallel
Expand Down
2 changes: 1 addition & 1 deletion scripts/a2c/config_scaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ experiment_name: acegen
agent_name: a2c
log_dir: results
logger_backend: null # csv, wandb, tensorboard, or null
seed: 101
seed: 101 # multiple seeds can be provided as a list to multiple experiments sequentially e.g. [101, 102, 103]

# Environment configuration
num_envs: 16 # Number of smiles to generate in parallel
Expand Down
2 changes: 1 addition & 1 deletion scripts/ppo/config_denovo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ experiment_name: acegen
agent_name: ppo
log_dir: results
logger_backend: null # csv, wandb, tensorboard, or null
seed: 101
seed: 101 # multiple seeds can be provided as a list to multiple experiments sequentially e.g. [101, 102, 103]

# Environment configuration
num_envs: 64 # Number of smiles to generate in parallel
Expand Down
2 changes: 1 addition & 1 deletion scripts/ppo/config_fragment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ experiment_name: acegen
agent_name: ppo
log_dir: results
logger_backend: null # csv, wandb, tensorboard, or null
seed: 101
seed: 101 # multiple seeds can be provided as a list to multiple experiments sequentially e.g. [101, 102, 103]

# Environment configuration
num_envs: 64 # Number of smiles to generate in parallel
Expand Down
2 changes: 1 addition & 1 deletion scripts/ppo/config_scaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ experiment_name: acegen
agent_name: ppo
log_dir: results
logger_backend: null # csv, wandb, tensorboard, or null
seed: 101
seed: 101 # multiple seeds can be provided as a list to multiple experiments sequentially e.g. [101, 102, 103]

# Environment configuration
num_envs: 64 # Number of smiles to generate in parallel
Expand Down
2 changes: 1 addition & 1 deletion scripts/reinforce/config_denovo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ experiment_name: acegen
agent_name: reinforce
log_dir: results
logger_backend: null # csv, wandb, tensorboard, or null
seed: 101
seed: 101 # multiple seeds can be provided as a list to multiple experiments sequentially e.g. [101, 102, 103]

# Environment configuration
num_envs: 128 # Number of smiles to generate in parallel
Expand Down
10 changes: 1 addition & 9 deletions scripts/reinforce/config_fragment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ experiment_name: acegen
agent_name: reinvent
log_dir: results
logger_backend: null # csv, wandb, tensorboard, or null
seed: 101
seed: 101 # multiple seeds can be provided as a list to multiple experiments sequentially e.g. [101, 102, 103]

# Environment configuration
num_envs: 128 # Number of smiles to generate in parallel
Expand All @@ -29,11 +29,3 @@ model: gru # gru, lstm, or gpt2
lr: 0.0001
eps: 1.0e-08
weight_decay: 0.0

# Reinforce configuration
sigma: 120

# Data replay configuration
replay_buffer_size: 100
experience_replay: True
replay_batch_size: 10
2 changes: 1 addition & 1 deletion scripts/reinforce/config_scaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ experiment_name: acegen
agent_name: reinvent
log_dir: results
logger_backend: null # csv, wandb, tensorboard, or null
seed: 101
seed: 101 # multiple seeds can be provided as a list to multiple experiments sequentially e.g. [101, 102, 103]

# Environment configuration
num_envs: 128 # Number of smiles to generate in parallel
Expand Down
2 changes: 1 addition & 1 deletion scripts/reinvent/config_denovo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ experiment_name: acegen
agent_name: reinvent
log_dir: results
logger_backend: null # csv, wandb, tensorboard, or null
seed: 101
seed: 101 # multiple seeds can be provided as a list to multiple experiments sequentially e.g. [101, 102, 103]

# Environment configuration
num_envs: 128 # Number of smiles to generate in parallel
Expand Down
2 changes: 1 addition & 1 deletion scripts/reinvent/config_fragment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ experiment_name: acegen
agent_name: reinvent
log_dir: results
logger_backend: null # csv, wandb, tensorboard, or null
seed: 101
seed: 101 # multiple seeds can be provided as a list to multiple experiments sequentially e.g. [101, 102, 103]

# Environment configuration
num_envs: 128 # Number of smiles to generate in parallel
Expand Down
10 changes: 0 additions & 10 deletions scripts/reinvent/reinvent.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@
os.chdir("/tmp")


from acegen.scoring_functions import (
custom_scoring_functions,
register_custom_scoring_function,
)

my_scoring_function = lambda x: [float(1)] * len(x)
register_custom_scoring_function("my_scoring_function", my_scoring_function)
custom_scoring_functions["my_scoring_function"]


@hydra.main(
config_path=".",
config_name="config_denovo",
Expand Down

0 comments on commit 7a35ce8

Please sign in to comment.