Coder Social home page Coder Social logo

Comments (6)

GuoJeff avatar GuoJeff commented on August 21, 2024

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.

from reinvent.

xuzhang5788 avatar xuzhang5788 commented on August 21, 2024

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
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'

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.

from reinvent.

GuoJeff avatar GuoJeff commented on August 21, 2024

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.

from reinvent.

xuzhang5788 avatar xuzhang5788 commented on August 21, 2024

@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
manager.run()
File "/mnt/SSD/projects/Reinvent/running_modes/manager.py", line 16, in run
runner = RunningMode(self.configuration)
File "/mnt/SSD/projects/Reinvent/running_modes/constructors/running_mode.py", line 22, in new
return TransferLearningModeConstructor(configuration)
File "/mnt/SSD/projects/Reinvent/running_modes/constructors/transfer_learning_mode_constructor.py", line 31, in new
model = Model.load_from_file(config.input_model_path)
File "/home/pharma1/miniconda3/envs/reinvent.v3.0/lib/python3.7/site-packages/reinvent_models/reinvent_core/models/model.py", line 123, in load_from_file
save_dict = torch.load(file_path)
File "/home/pharma1/miniconda3/envs/reinvent.v3.0/lib/python3.7/site-packages/torch/serialization.py", line 595, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/pharma1/miniconda3/envs/reinvent.v3.0/lib/python3.7/site-packages/torch/serialization.py", line 774, in _legacy_load
result = unpickler.load()
ModuleNotFoundError: No module named 'models'
Exception ignored in: <function LocalTransferLearningLogger.del at 0x7fb414e33e60>
Traceback (most recent call last):
File "/mnt/SSD/projects/Reinvent/running_modes/transfer_learning/logging/local_transfer_learning_logger.py", line 20, in del
File "/home/pharma1/miniconda3/envs/reinvent.v3.0/lib/python3.7/site-packages/torch/utils/tensorboard/writer.py", line 1033, in close
File "/home/pharma1/miniconda3/envs/reinvent.v3.0/lib/python3.7/site-packages/torch/utils/tensorboard/writer.py", line 133, in flush
File "/home/pharma1/miniconda3/envs/reinvent.v3.0/lib/python3.7/site-packages/tensorboard/summary/writer/event_file_writer.py", line 106, in flush
File "/home/pharma1/miniconda3/envs/reinvent.v3.0/lib/python3.7/site-packages/tensorboard/summary/writer/event_file_writer.py", line 156, in flush
File "/home/pharma1/miniconda3/envs/reinvent.v3.0/lib/python3.7/site-packages/tensorboard/summary/writer/record_writer.py", line 42, in flush
File "/home/pharma1/miniconda3/envs/reinvent.v3.0/lib/python3.7/site-packages/tensorflow_core/python/lib/io/file_io.py", line 230, in flush
AttributeError: 'NoneType' object has no attribute 'raise_exception_on_not_ok_status'

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.

from reinvent.

patronov avatar patronov commented on August 21, 2024

I believe the issue reported here should be fixed now.

from reinvent.

xuzhang5788 avatar xuzhang5788 commented on August 21, 2024

@patronov
Thanks. It works now!

from reinvent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.