参考链接:
github链接
chatgpt提供解决方案
推理权重问题解决方案
推理文件问题解决方案
推理文件问题解决方案第二步
运行步骤及问题解决
git clone https://github.com/MolecularAI/Chemformer.git
conda env create -f env-dev.yml
poetry install
问题:- Additional properties are not allowed ('group' was unexpected)
解决:pip install poetry==1.2.0
rm poetry.lock
poetry install
问题:The lock file is not compatible with the current version of Poetry. Upgrade Poetry to be able to read the lock file or, alternatively, regenerate the lock file with the poetry lock command.
解决:rm poetry.lock
poetry install
sh example_scripts/fine_tune.sh
问题:hydra.errors.OverrideParseException: LexerNoViableAltException:
解决:python -m molbart.fine_tune \
"datamodule=[molbart.data.seq2seq_data.Uspto50DataModule]" \
"data_path=data/uspto_50.pickle" \
"model_path=models/bart/span_aug.ckpt" \
"vocabulary_path=bart_vocab_downstream.json" \
"task=backward_prediction" \
"n_epochs=100" \
"learning_rate=0.001" \
"schedule=cycle" \
"batch_size=64" \
"acc_batches=4" \
"augmentation_probability=0.5"
问题:3090要求cuda>11.0
解决:torch下载1.8.1+cu111,pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
sh example_scripts/predict.sh
解决:见github的issue
问题:推理乱码问题
解决:见github的第二个issue,主要问题还是没有提供输入文件uspto_50_test.txt和权重文件saved_models/uspto_50/span_aug/100_epochs/last.ckpt
结语
readme写的很详细,但是作为非化学者还是不懂在搞啥,再加上英文的偏差,让理解更加艰难.感觉是一个很小众的赛道,关注人较少,类似与分类问题,但是在该数据集也只能达到60多的top1?
解决:知网搜索类似中文文献.