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

Unknown module snnnet #1

Open
Skwiwel opened this issue Mar 16, 2022 · 5 comments
Open

Unknown module snnnet #1

Skwiwel opened this issue Mar 16, 2022 · 5 comments

Comments

@Skwiwel
Copy link

Skwiwel commented Mar 16, 2022

Hi,

I would like to try out your method for graph processing. Unfortunately, a Python module, snnnet, is required that I could not find anywhere by name. Would it be possible to include the module or to link to it in a requirements.txt for download with pip?

It's not quite clear to me what the Sn torch modules ought to be doing underneath, so I've had a hard time looking for the correct package.

Many thanks!

@HyTruongSon
Copy link
Owner

Hi,
Thank you very much for using the package and reaching out! snnnet was a package that I used internally in our research group. I forgot to comment that line out. You can comment the line out and the code should run normally. I don't use any functionalities from snnnet in my implementation. Please let me know if you can run the code!
Best,
Son

@Skwiwel
Copy link
Author

Skwiwel commented Mar 17, 2022

Thank you for the timely answer. I've succeeded in running the training script.

One small thing prevents the run by default. Where the logging file is opened the directory for the log doesn't exist. Throwing in a os.makedirs(args.dir, exist_ok=True) fixes the issue.

I'm running torch 1.9.0 instead of 1.8.0 and I'm getting some immense spam of deprecation warnings. I you were looking to potentially fix these:

  • change F.tanh to torch.tanh
  • change torch.ByteTensor() to torch.BoolTensor() when indexing the matrix in the filter() function definition

The above don't change the training results.

Regarding the snnnet package, this training script (traing_mgvae.py) is not the only one using the package. Most of the other files also actually use some of the imports. For example, SnDecoder is seemingly used in train_mgvae_2nd_cluster_trial.py.

@HyTruongSon
Copy link
Owner

HyTruongSon commented Mar 17, 2022

Hi. Thank you for your good fixes!

For the log, in the training script https://github.com/HyTruongSon/MGVAE/blob/master/citation_link_prediction/train_mgvae.sh, I create the directory for the log, so I guess it should exist before the training program.

For the PyTorch's functions, yes I agree. Thanks!

For the snnnet package, yes, I will remove all lines that call it. But the train_mgvae_2nd_cluster_trial.py actually needs it because it uses the second-order network that was only implemented in the package. Sorry that this one is not runnable for you right now. But in the future, when the package is available then it is possible.

Best,
Son

@Skwiwel
Copy link
Author

Skwiwel commented Mar 17, 2022

I'm actually most interested in the graph generation task. Our team would like to benchmark this solution in a graph reconstruction task, i.e. how well the autoencoder output approximates the input while introducing a light latent tensor dimension constraint.

It seems that these scripts all require the snnnet package. Wouldn't it be possible to include the code required to run these?

Other than that, which of the models defined in the graph generation directory would, to your knowledge, be most performant for a task of adjacency matrix reconstruction without node or edge features?

@vinesconnor
Copy link

Hi,

I am actually looking to do something similar, benchmarking this solution in graph generation. Was this snnnet package ever posted?

Thanks

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

3 participants