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

“check_conditional” function missing in networkTMLE/AmonHen/amonhen/utils.py #2

Open
SuhanG17 opened this issue Dec 19, 2023 · 2 comments

Comments

@SuhanG17
Copy link

Hi, we find your work "NetworkTMLE" very interesting, and we would like to reproduce the simulation on our own. However, we have also found the following issues or bugs in the published code. Perhaps the code may not be up-to-date? If you could respond to the problems we ran into and listed below, we would really appreciate your help.

  1. The dependencies omit the matplotlib pkg, which is required for NetworkX.
  2. When running the example_usage.py, we encountered the following bug report:
    1. By running command from amonhen import NetworkTMLE, it is reported that in the AmoHen pkg, check_conditional and stochastic_check_conditional cannot be found in the utils.py. This is true in the current version.
    2. By running command from beowulf import (...), it is reported that ModuleNotFoundError: No module named 'beowulf.dgm' in the publications-code/networkTMLE/Beowulf/beowulf/__init__.py file
    3. The same issue occurred when we ran from beowulf.dgm import ...

We have listed the error message below, let us know if there's anything we have done wrong or missed. Thank you in advance!

Screenshot 2023-12-19 at 10 53 00
Screenshot 2023-12-19 at 10 52 50

@pzivich
Copy link
Owner

pzivich commented Dec 19, 2023

Hi @SuhanG17

RE 1: matplotlib is not listed as a dependency since it was not a direct dependency. The other libraries also have dependencies, I didn't list out the subdependencies of each package. If you're using pip, they should all install.

RE 2i: The stochastic_check_conditional function is not used. Originally, I implemented conditional plans differently. However, I moved away from that API and have the probabilities for each individual under the plan instead. That function (and the corresponding logic) should have been removed. Seems I missed that change.

Instead of AmonHen, which was my internal implementation, I would use MossSpider. This is my packaged version of the network-TMLE code. It also is a little bit faster. You'll also notice that matplotlib is a dependency, since there are some plotting functions included. https://github.com/pzivich/MossSpider

RE 2ii & 2iii: that was an error on my part going from my local import. In the setup.py, I need to add 'beowulf.dgm' to the packages argument since it is a directory. I made the change local to check. I just pushed the fixed setup.py file.

This did raise another issue when I was running the example on my computer. In v3+ of NetworkX, they changed the return type of the adjacency matrices. That breaks one of the later functions. I will have to see how to get around that, but use some 2.x version of NetworkX for the time being. This issue will also apply to MossSpider.

@SuhanG17
Copy link
Author

Hi, @pzivich
Thank you so much for your quick and detailed response!
We will download the latest version of the code and check out MossSpider while you work on matching the type of adjacency matrices. Good luck, and we hope to hear from you soon.

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