schwallergroup / saturn

Sample-efficient Generative Molecular Design using Memory Manipulation
Other
26 stars 3 forks source link

Error with Replay Buffer #4

Open JanoschMenke opened 23 hours ago

JanoschMenke commented 23 hours ago

Hi Jeff,

When trying to run Saturn I get the following error message for the replay buffer.

Traceback (most recent call last):
  File "/app/saturn/saturn.py", line 76, in <module>
    reinforcement_learning_agent = ReinforcementLearningAgent(
  File "/app/saturn/goal_directed_generation/reinforcement_learning.py", line 66, in __init__
    self.oracle = self.replay_buffer.prepopulate_buffer(self.oracle)
  File "/app/saturn/experience_replay/replay_buffer.py", line 138, in prepopulate_buffer
    rewards = np.empty((len(oracle), len(mols)))
TypeError: object of type 'Oracle' has no len()

This is the part of the config

    "experience_replay": {
      "memory_size": 100,  
      "sample_size": 10, 
      "smiles": []  

Do you know what could cause this?

GuoJeff commented 23 hours ago

Hi Janosch,

Sorry for this, it is a mistake in an attribute calling in the function. I just pushed a change.

JanoschMenke commented 8 hours ago

Awesome thanks for the quick fix.