muhanzhang / D-VAE

D-VAE: A Variational Autoencoder for Directed Acyclic Graphs, NeurIPS 2019
MIT License
123 stars 28 forks source link

Cannot reproduce #1

Closed AnnaAraslanova closed 4 years ago

AnnaAraslanova commented 4 years ago

Hi I just run the line

python train.py --data-type ENAS --reprocess --data-name final_structures6 --save-interval 10 --save-appendix _SVAE --epochs 300 --lr 1e-4 --model SVAE --bidirectional --nz 56 --batch-size 32

and get approximately 0 test accuracy, the same is for --model DVAE. Could you rerun it and confirm that your code works ok, please?

muhanzhang commented 4 years ago

Hi, thanks for running the code. The code ran ok on my machine before launching. I'll check again tomorrow. Could you also attach a screenshot of your running logs and results? Thanks.

muhanzhang commented 4 years ago

Hi, a quick note, I ran S-VAE using your command with "--bidirectional" enabled and the loss did not seem to decrease. But after deleting "--bidirectional" the loss started to decrease and quickly reached near zero (the S-VAE in the paper did not use bidirectional).

AnnaAraslanova commented 4 years ago

@muhanzhang thank you for the advice to delete bidirectional, w/o the rule your implementation of SVAE works well! I feel I could misprint smth in DVAE training, I will retest and close the issue

AnnaAraslanova commented 4 years ago

Mb a working docker container will be useful for someone to run the code:

nvidia-docker run -it --name=deepo_dvae -p 8875:8875 -v /home/:/data --ipc=host --runtime=nvidia ufoym/deepo:all-py36-jupyter bash
add-apt-repository ppa:igraph/ppa
pip install --upgrade pip;\
pip uninstall -y torch;\
pip install torch==0.4.1;\
apt-get -y update;\
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64;\
apt-get -y install python3-dev;\
apt-get -y install libgraphviz-dev;\
pip install pygraphviz;\
pip install tqdm;\
apt-get -y install graphviz-dev;\
apt-get -y install pkg-config;\
apt -y install python-dev;\
apt -y install libxml2;\
apt -y install libxml2-dev;\
apt-get -y install python3-tk;\
pip install cairocffi;\
pip -v install python-igraph==0.7.1.post6;\
echo "backend: Agg" > ~/.config/matplotlib/matplotlibrc;
muhanzhang commented 4 years ago

Hello, my run of S-VAE with your command without --bidirectional results in 99.98% recon accuracy, which aligns with the paper.

AnnaAraslanova commented 4 years ago

@muhanzhang My fault. Sorry. All works great

muhanzhang commented 4 years ago

No problem. Thanks for checking the code!