diff --git a/acegen/__init__.py b/acegen/__init__.py index 904c09e5..832aa7fb 100644 --- a/acegen/__init__.py +++ b/acegen/__init__.py @@ -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, @@ -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 diff --git a/scripts/a2c/config_denovo.yaml b/scripts/a2c/config_denovo.yaml index 56f01fef..e5118262 100644 --- a/scripts/a2c/config_denovo.yaml +++ b/scripts/a2c/config_denovo.yaml @@ -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 diff --git a/scripts/a2c/config_fragment.yaml b/scripts/a2c/config_fragment.yaml index fdd5bffa..5d727d8a 100644 --- a/scripts/a2c/config_fragment.yaml +++ b/scripts/a2c/config_fragment.yaml @@ -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 diff --git a/scripts/a2c/config_scaffold.yaml b/scripts/a2c/config_scaffold.yaml index 823a5a24..3c7bf386 100644 --- a/scripts/a2c/config_scaffold.yaml +++ b/scripts/a2c/config_scaffold.yaml @@ -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 diff --git a/scripts/ppo/config_denovo.yaml b/scripts/ppo/config_denovo.yaml index a0601c07..24af50a7 100644 --- a/scripts/ppo/config_denovo.yaml +++ b/scripts/ppo/config_denovo.yaml @@ -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 diff --git a/scripts/ppo/config_fragment.yaml b/scripts/ppo/config_fragment.yaml index 35737c21..9d7c20b3 100644 --- a/scripts/ppo/config_fragment.yaml +++ b/scripts/ppo/config_fragment.yaml @@ -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 diff --git a/scripts/ppo/config_scaffold.yaml b/scripts/ppo/config_scaffold.yaml index 07284143..42609198 100644 --- a/scripts/ppo/config_scaffold.yaml +++ b/scripts/ppo/config_scaffold.yaml @@ -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 diff --git a/scripts/reinforce/config_denovo.yaml b/scripts/reinforce/config_denovo.yaml index 9d8ca827..c2b5c9ac 100644 --- a/scripts/reinforce/config_denovo.yaml +++ b/scripts/reinforce/config_denovo.yaml @@ -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 diff --git a/scripts/reinforce/config_fragment.yaml b/scripts/reinforce/config_fragment.yaml index 6f34b6f6..07b0b990 100644 --- a/scripts/reinforce/config_fragment.yaml +++ b/scripts/reinforce/config_fragment.yaml @@ -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 @@ -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 diff --git a/scripts/reinforce/config_scaffold.yaml b/scripts/reinforce/config_scaffold.yaml index 25a5182e..08956360 100644 --- a/scripts/reinforce/config_scaffold.yaml +++ b/scripts/reinforce/config_scaffold.yaml @@ -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 diff --git a/scripts/reinvent/config_denovo.yaml b/scripts/reinvent/config_denovo.yaml index ebd7d1cd..44c3e830 100644 --- a/scripts/reinvent/config_denovo.yaml +++ b/scripts/reinvent/config_denovo.yaml @@ -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 diff --git a/scripts/reinvent/config_fragment.yaml b/scripts/reinvent/config_fragment.yaml index 6f34b6f6..a374701b 100644 --- a/scripts/reinvent/config_fragment.yaml +++ b/scripts/reinvent/config_fragment.yaml @@ -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 diff --git a/scripts/reinvent/reinvent.py b/scripts/reinvent/reinvent.py index d5e1346d..a61c8f7a 100644 --- a/scripts/reinvent/reinvent.py +++ b/scripts/reinvent/reinvent.py @@ -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",