bp-kelley / descriptastorus

Descriptor computation(chemistry) and (optional) storage for machine learning
Other
220 stars 62 forks source link

PyTorch installation may be too old' #29

Open mahuahuahua opened 6 months ago

mahuahuahua commented 6 months ago

Hello, I followed the instructions you provided for setting up the AdvProp/graph environment and successfully executed Step 1 'bash ./scripts/train_data.sh' and Step 2 'bash ./scripts/predict.sh'. Below are the details of each step. In Step 1, the file 'qm8.pt' was generated, indicating that this step was executed correctly. However, I encountered an issue in Step 2: it displayed a message 'PyTorch installation may be too old', despite the fact that the installation version of PyTorch (1.4.0) is explicitly specified in the YAML file. Could you please provide guidance on how to address this problem? Your prompt assistance would be greatly appreciated

Step 1“bash ./scripts/tran_data.sh” (graph) [graph]$bash ./scripts/tran_data.sh =====Transform data for qm8===== =====Hyperparameter configuration===== Namespace(dataset='qm8', graph_level_feature=True, junction_tree=True, ori_dataset_path='../../datasets/moleculenet/', pro_dataset_path='../../datasets/moleculenet_pro/') There is no edge, we should give an empty tensor to edge_attr. Molecule is in row: 2 There is no edge, we should give an empty tensor to edge_attr. Molecule is in row: 3 There is no edge, we should give an empty tensor to edge_attr. Molecule is in row: 4

Step 2 “bash ./scripts/predict.sh” (graph) [graph]$ bash ./scripts/predict.sh =====Use the model trained on qm8 (random split seed=122) to make prediction===== +-------------------+--------------------------------------------+ | Parameter | Value | +===================+============================================+ | Dataset | qm8 | +-------------------+--------------------------------------------+ | Model dir | ../trained_models/ml2features_qm8_seed_122 | +-------------------+--------------------------------------------+ | Ori dataset path | ../../datasets/moleculenet/ | +-------------------+--------------------------------------------+ | Pro dataset path | ../../datasets/moleculenet_pro/ | +-------------------+--------------------------------------------+ | Save pred | 1 | +-------------------+--------------------------------------------+ | Save result dir | ../prediction_results/ | +-------------------+--------------------------------------------+ | Split mode | random | +-------------------+--------------------------------------------+ | Split ready | 0 | +-------------------+--------------------------------------------+ | Split seed | 122 | +-------------------+--------------------------------------------+ | Split train ratio | 0.8000000000 | +-------------------+--------------------------------------------+ | Split valid ratio | 0.1000000000 | +-------------------+--------------------------------------------+ | Testfile | None | +-------------------+--------------------------------------------+ {'model': 'ml2', 'task_type': 'regression', 'metric': 'mae', 'num_tasks': 12, 'graph_level_feature': True, 'epochs': 400, 'early_stopping': 200, 'lr': 0.0001, 'lr_decay_factor': 0.8, 'lr_decay_step_size': 50, 'dropout': 0, 'weight_decay': 0, 'depth': 3, 'hidden': 256, 'batch_size': 64, 'vt_batch_size': 1000} -----Random splitting----- =====Total number of test graphs in qm8 : 2179 =====

Loading trained medel and testing... Traceback (most recent call last): File "../src/predict.py", line 162, in model.load_state_dict(torch.load(model_dir)) File "/public/software/Miniconda37/envs/graph/lib/python3.7/site-packages/torch/serialization.py", line 527, in load with _open_zipfile_reader(f) as opened_zipfile: File "/public/software/Miniconda37/envs/graph/lib/python3.7/site-packages/torch/serialization.py", line 224, in init super(_open_zipfile_reader, self).init(torch.C.PyTorchFileReader(name_or_buffer))

RuntimeError: version <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at /pytorch/caffe2/serialize/inline_container.cc:132, please report a bug to PyTorch. Attempted to read a PyTorch file with version 3, but the maximum supported version for reading is 2. Your PyTorch installation may be too old. (init at /pytorch/caffe2/serialize/inline_container.cc:132)

frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x33 (0x7f81ab660193 in /public/software/Miniconda37/envs/graph/lib/python3.7/site-packages/torch/lib/libc10.so) frame https://github.com/bp-kelley/descriptastorus/pull/1: caffe2::serialize::PyTorchStreamReader::init() + 0x1f5b (0x7f81ad7b0f8b in /public/software/Miniconda37/envs/graph/lib/python3.7/site-packages/torch/lib/libtorch.so) frame https://github.com/bp-kelley/descriptastorus/pull/2: caffe2::serialize::PyTorchStreamReader::PyTorchStreamReader(std::string const&) + 0x64 (0x7f81ad7b21a4 in /public/software/Miniconda37/envs/graph/lib/python3.7/site-packages/torch/lib/libtorch.so) frame https://github.com/bp-kelley/descriptastorus/issues/3: + 0x68ea06 (0x7f81bac75a06 in /public/software/Miniconda37/envs/graph/lib/python3.7/site-packages/torch/lib/libtorch_python.so) frame https://github.com/bp-kelley/descriptastorus/pull/4: + 0x2701f4 (0x7f81ba8571f4 in /public/software/Miniconda37/envs/graph/lib/python3.7/site-packages/torch/lib/libtorch_python.so)

frame #29: __libc_start_main + 0xf5 (0x7f82f2bda555 in /lib64/libc.so.6)

bp-kelley commented 6 months ago

@mahuahuahua I think you added this issue to the wrong repository. Descriptasorus doesn’t depend on PyTorch.