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

LexerNoViableAltException: 2020 & import ddpm error #3

Open
ytwas opened this issue Mar 13, 2023 · 8 comments
Open

LexerNoViableAltException: 2020 & import ddpm error #3

ytwas opened this issue Mar 13, 2023 · 8 comments

Comments

@ytwas
Copy link

ytwas commented Mar 13, 2023

thanks for sharing this awesome work! But I cannot run the code, due to some errors.
when I use the provided command to train vqgan:
PL_TORCH_DISTRIBUTED_BACKEND=gloo python train/train_vqgan.py dataset=brats dataset.root_dir=../data/BraTS/BraTS 2020 model=vq_gan_3d model.gpus=1 model.default_root_dir_postfix='flair' model.precision=16 model.embedding_dim=8 model.n_hiddens=16 model.num_workers=32 model.gradient_clip_val=1.0 model.lr=3e-4 model.discriminator_iter_start=10000 model.perceptual_weight=4 model.image_gan_weight=1 model.video_gan_weight=1 model.gan_feat_weight=4 model.batch_size=2 model.n_codes=16384 model.accumulate_grad_batches=1

The error information:

Traceback (most recent call last):
File "train/train_vqgan.py", line 8, in
from ddpm.diffusion import default
ModuleNotFoundError: No module named 'ddpm'


Then I try to use export PYTHONPATH=$PYTHONPATH:~/gitcode/medicaldiffusion/ddpm to fix it,
but a new error come up:

LexerNoViableAltException: 2020
^
See https://hydra.cc/docs/next/advanced/override_grammar/basic for details
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.


Thanks in advance!

@ytwas
Copy link
Author

ytwas commented Mar 14, 2023

I fix the problem, the terminal misunderstand the path../data/BraTS/BraTS 2020 ,
I change it to '../data/BraTS/BraTS_2020`

@sulaimanvesal
Copy link

hi, the problem still exist. I cloned the recent code and yet saying no ddpm.

@lihao9056
Copy link

我解决了问题,终端误解了路径../data/BraTS/BraTS 2020 ,我把它改成../data/BraTS/BraTS_2020 '

thanks you for sharing your experience.Could you share your data directory.I would be very thankful.

@ytwas
Copy link
Author

ytwas commented Mar 16, 2023

thanks you for sharing your experience.Could you share your data directory.I would be very thankful.

我把数据放到了和克隆的代码“medicaldiffusion”这个文件夹同一级的目录下, 目录就像我用的参数一样,只是BraTS 2020没法在终端里使用,因为空格会被识别成分隔下一个参数,所以把空格替换成了下划线

@ytwas
Copy link
Author

ytwas commented Mar 16, 2023

hi, the problem still exist. I cloned the recent code and yet saying no ddpm.

I failed to run the code, either. Maybe you can try the command export PYTHONPATH=$PYTHONPATH:<PATH TO ddpm> in terminal, and then run the trainning
I still have other problem about 'hydra' library

@lihao9056
Copy link

thank you very much for your reply.

@Zhongrocky
Copy link

Zhongrocky commented May 6, 2023

thanks you for sharing your experience.Could you share your data directory.I would be very thankful.

我把数据放到了和克隆的代码“medicaldiffusion”这个文件夹同一级的目录下, 目录就像我用的参数一样,只是BraTS 2020没法在终端里使用,因为空格会被识别成分隔下一个参数,所以把空格替换成了下划线

@ytwas 您好,请问您复现了这个代码了么?我在实现这个代码加载数据集的时候,每次都会报错,说数据集不可用。可以确定的是我的数据集名字是没有空格的。

@yunfei920406
Copy link

I have experienced the same problem. Can you help me?

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

5 participants