Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行demo报错 #25

Closed
zcy626727 opened this issue Apr 10, 2023 · 2 comments
Closed

运行demo报错 #25

zcy626727 opened this issue Apr 10, 2023 · 2 comments

Comments

@zcy626727
Copy link

zcy626727 commented Apr 10, 2023

报错信息如下:

This demo is powered by NeuralKG 
Global seed set to 321
GPU available: True, used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]
Traceback (most recent call last):
  File "/chu xue zhehome/zcy/Code/PyCharm/NeuralKG/demo.py", line 121, in <module>
    main(arg_path='config/TransE_demo_kg.yaml')
  File "/home/zcy/Code/PyCharm/NeuralKG/demo.py", line 99, in main
    trainer.fit(lit_model, datamodule=kgdata)
  File "/home/zcy/Code/PyCharm/NeuralKG/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 740, in fit
    self._call_and_handle_interrupt(
  File "/home/zcy/Code/PyCharm/NeuralKG/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 685, in _call_and_handle_interrupt
    return trainer_fn(*args, **kwargs)
  File "/home/zcy/Code/PyCharm/NeuralKG/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 777, in _fit_impl
    self._run(model, ckpt_path=ckpt_path)
  File "/home/zcy/Code/PyCharm/NeuralKG/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1145, in _run
    self.accelerator.setup(self)
  File "/home/zcy/Code/PyCharm/NeuralKG/venv/lib/python3.8/site-packages/pytorch_lightning/accelerators/gpu.py", line 46, in setup
    return super().setup(trainer)
  File "/home/zcy/Code/PyCharm/NeuralKG/venv/lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 93, in setup
    self.setup_optimizers(trainer)
  File "/home/zcy/Code/PyCharm/NeuralKG/venv/lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 354, in setup_optimizers
    optimizers, lr_schedulers, optimizer_frequencies = self.training_type_plugin.init_optimizers(
  File "/home/zcy/Code/PyCharm/NeuralKG/venv/lib/python3.8/site-packages/pytorch_lightning/plugins/training_type/training_type_plugin.py", line 245, in init_optimizers
    return trainer.init_optimizers(model)
  File "/home/zcy/Code/PyCharm/NeuralKG/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/optimizers.py", line 44, in init_optimizers
    lr_schedulers = self._configure_schedulers(lr_schedulers, monitor, not pl_module.automatic_optimization)
  File "/home/zcy/Code/PyCharm/NeuralKG/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/optimizers.py", line 192, in _configure_schedulers
    raise ValueError(f'The provided lr scheduler "{scheduler}" is invalid')
ValueError: The provided lr scheduler "<torch.optim.lr_scheduler.MultiStepLR object at 0x7fc858e5fb80>" is invalid

Process finished with exit code 1

大概环境配置如下:

conda create -n neuralkg python=3.8
conda activate neuralkg
pip install torch torchvision torchaudio
pip install  dgl -f https://data.dgl.ai/wheels/cu117/repo.html
pip install  dglgo -f https://data.dgl.ai/wheels-test/repo.html
pip install neuralkg
git clone git@github.com:zjukg/NeuralKG.git
python setup.py install

我是初学者,是我环境配置的有问题吗?

@zcy626727
Copy link
Author

已解决,版本安装错了

@StudyZH
Copy link

StudyZH commented Jun 14, 2023

请问版本是多少,我也报这样的错误了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants