schwallergroup / saturn

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

Error running part-1 example #2

Closed PatWalters closed 6 months ago

PatWalters commented 6 months ago

After a few tweaks, I was able to install saturn. However, I encountered an error when I tried to run the first example.

cd saturn/experimental_reproduction/part_1
python ../../saturn.py part-1-mamba-config.json
python ../../saturn.py part-1-mamba-config.json
Traceback (most recent call last):
  File "/home/ubuntu/software/saturn/experimental_reproduction/part_1/../../saturn.py", line 73, in 
    reinforcement_learning_agent = ReinforcementLearningAgent(
  File "/home/ubuntu/software/saturn/goal_directed_generation/reinforcement_learning.py", line 56, in __init__
    self.margin_threshold = configuration.reinforcement_learning.margin_threshold
AttributeError: 'ReinforcementLearningParameters' object has no attribute 'margin_threshold'
GuoJeff commented 6 months ago

Hi @PatWalters,

I pushed a small change that removed this line of code which I mistakenly kept in the initial commit of this repository. Would you be able to pull and re-run the command?

The Margin Threshold was initially used in an implementation of REINVENT 3.2's Margin Guard which automatically adjusts the sigma hyperparameter (weights the contribution of the reward function) and is not used in Saturn.

PatWalters commented 6 months ago

Thanks @GuoJeff, that worked. One installation note: when I initially installed, I got a libc++ error

ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found

To fix this I did the following

conda uninstall openbabel 
conda install gcc_linux-64
conda install gxx_linux-64
conda install -c conda-forge openbabel
GuoJeff commented 6 months ago

Hi @PatWalters,

Thank you for flagging this and sharing the solution! I pushed a change to the README highlighting this error and pointing to this issue.

The change is merged in this commit: 9e3e158517f1a177d05e7e0528018feca869bcef

Thank you also for trying out saturn. I will close this issue for now.