Closed xuzhang5788 closed 3 years ago
Hi @xuzhang5788,
Sorry for the delay. I just pushed many changes to the reinvent and reinvent community repositories. The new changes are related to the release of the new REINVENT 3.0 version. Some of the errors you were receiving were due to out of date packages which should now all be fixed.
I have executed all the notebooks in https://github.com/MolecularAI/ReinventCommunity and they should all work. Would you be able to re-install the new conda environments and try the notebooks again (they have been updated)? Let me know if anything does not work.
Thank you for your update. I reinstalled Reinvent 3.0 and ReinventCommunity. Unfortunately, I still got error messages: (ran in the notebook and also in command-line)
Traceback (most recent call last):
File "../../Reinvent/input.py", line 20, in
In your example, you used reinvent_dir = os.path.expanduser("~/Desktop/reinventcli")
I think it is where the reinvent 3.0 is. From git clone, I got a new folder called Reinvent. So, I used reinvent_dir = os.path.expanduser("../../Reinvent")
. Because the folders of Reinvent3.0 and ReinventCoomunity are in the same directory.
Hi @xuzhang5788,
Before running REINVENT
, a config.json
needs to be set-up. In the directory: Reinvent/configs
, there is a file called example.config.json
. This file is the template for how the config.json
needs to be set-up. The easiest way is to make a copy of the example.config.json
and name it config.json
. At this point, you should be able to run REINVENT
without any further changes.
However, it is good to run the provided unit tests to make sure everything is working properly. If you want to run the unit tests, the config.json
needs to be edited to specify absolute paths to different REINVENT
tools/files. These are the paths that the unit tests will use. For example, you can specify the absolute path to the provided prior in the PRIOR_PATH
field. Once specified, unit tests which require a prior will find the prior from that path. There is some information regarding this in the README
.
@GuoJeff
Thank you so much. According to your advice, I changed the name example.config.json
to config.json
and tried all the notebooks. Everyone works except Transfer_Learning_Demo_Teachers_Forcing.jpynb
. I got:
Traceback (most recent call last):
File "../../Reinvent/input.py", line 21, in
Anyways, I am glad that I can run most of the examples. About the unit tests, I need time to figure out how to set the config.json
. Maybe I still need your help. Thanks again.
I believe the issue reported here should be fixed now.
@patronov Thanks. It works now!
Thank you for your great repo. I struggled with this problem for a while. I don't know where I am wrong. I just followed the instructions you gave. I will show how I installed the libraries and how I run the notebooks in detail. It is a little bit longer, but please help me.
install reinvent library $ git clone https://github.com/MolecularAI/Reinvent.git $ cd Reinvent $ conda env create -f reinvent.yml $ conda activate reinvent.v3.0
then I opened another terminal to install ReinventCommunity $ git clone https://github.com/MolecularAI/ReinventCommunity.git $ cd ReinventCommunity $ conda env create -f environment.yml $ conda activate ReinventCommunity
ran one of the notebooks, here I chose the first example. (ReinventCommunity) pharma1@pharma1:/mnt/SSD/projects/ReinventCommunity$ jupyter notebook a. opened file "Complete_Use-Case-DRD2_Demo.ipynb"
b. changed cell No.1 only the following part to meet my system
from:
reinvent_dir = os.path.expanduser("~/Desktop/Projects/Publications/2020/2020-04_REINVENT_2.0/Reinvent") reinvent_env = os.path.expanduser("~/miniconda3/envs/reinvent_shared.v2.1") output_dir = os.path.expanduser("~/Desktop/REINVENT_Use-Case-DRD2_demo")
to:
reinvent_dir = os.path.expanduser("../../Reinvent")
reinvent_env = os.path.expanduser("~/miniconda3/envs/reinvent.v3.0")
output_dir = os.path.expanduser("~/Desktop/REINVENT_Use-Case-DRD2_demo")
c. ran the following cells until cell No.12 without any error
d. ran cell No.13 showed the following error messages: Traceback (most recent call last): File "../../Reinvent/input.py", line 6, in
from running_modes.manager import Manager
File "/mnt/SSD/projects/Reinvent/running_modes/manager.py", line 4, in
from running_modes.configurations import GeneralConfigurationEnvelope
File "/mnt/SSD/projects/Reinvent/running_modes/configurations/init.py", line 2, in
from running_modes.configurations.scoring import ScoringRunnerComponents, ScoringRunnerConfiguration
File "/mnt/SSD/projects/Reinvent/running_modes/configurations/scoring/init.py", line 1, in
from running_modes.configurations.scoring.scoring_runner_components import ScoringRunnerComponents
File "/mnt/SSD/projects/Reinvent/running_modes/configurations/scoring/scoring_runner_components.py", line 3, in
from reinvent_scoring.scoring import ScoringFuncionParameters
ModuleNotFoundError: No module named 'reinvent_scoring'
e. I checked if reinvent_scoring was installed (reinvent.v3.0) pharma1@pharma1:/mnt/SSD/projects/Reinvent$ python Python 3.7.7 (default, Mar 26 2020, 15:48:22) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information.
It showed reinvent_scoring was installed for sure. So I don't know how this error happened.
f. I tried to run reinvent using the command-line execution just like you mentioned: $ conda activate reinvent.v3.0 (reinvent.v3.0) pharma1@pharma1:/mnt/SSD/projects/Reinvent$ python input.py /home/pharma1/Desktop/REINVENT_Use-Case-DRD2_demo/DRD2_config.json
I got the following error messages:
Traceback (most recent call last): File "input.py", line 20, in
manager = Manager(configuration)
File "/mnt/SSD/projects/Reinvent/running_modes/manager.py", line 13, in init
self._load_environmental_variables()
File "/mnt/SSD/projects/Reinvent/running_modes/manager.py", line 22, in _load_environmental_variables
with open(os.path.join(project_root, '../configs/config.json'), 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/SSD/projects/Reinvent/running_modes/../configs/config.json'
Do I need to change the name "DRD2_config.json" to "config.json" and put it into the folder where "example.config.json" is?
g. I tries the other examples, everything was okay until I need to run REINVENT, and the same errors appeared.
I really don't know where I was wrong! Any help is highly appreciated. I was so so frustrated. Many thanks.