-
Notifications
You must be signed in to change notification settings - Fork 7
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
Request for python version #10
Comments
I noticed that the requirements file contains two versions of pandas: pandas==1.5.3 and pandas==2.0.1. This causes an error due to conflicting dependencies. Could you please clarify which version of pandas should be used for this project? |
Hi! Best, |
Dear Fabio: I am currently working with your codebase and have encountered a couple of questions regarding its implementation details. I would appreciate it if you could provide some clarification on the following: In the train_pgm.py script, on line 132, there is the statement bs = batch["x"].shape[0]. Could you please clarify what "x" represents in this context? My batch dictionary does not have a key named "x", and I am unsure of its intended meaning. Similarly, in the flow_pgm.py script, the svi_model method contains the line with pyro.plate("observations", obs["x"].shape[0]):. Here, could you explain what "x" signifies within obs["x"].shape[0]? I assume it relates to the input data or features, but I would like to confirm its purpose. Your support has been invaluable, and I truly appreciate the time and effort you have dedicated to helping me. Thank you for your assistance. I look forward to hearing from you soon. Best regard |
No worries, happy to help! To answer your question, the "x" key in the batch dictionary refers to an input image variable - it is returned by the respective dataloader. If you only ever plan to use probabilistic graphical models (PGMs) that do not involve an "x" variable at all then you can edit the bits of code that depend on it. The following might help with any lingering doubts, lifted from here:
Best, |
Dear Fabio: I now have another question regarding the checkpoint files needed to run train_cf.py. Here is my current workflow: I ran main.py to obtain the checkpoint.pt file. --pgm_path should correspond to the checkpoint file generated by train_pgm.py. How do I obtain the pre-trained checkpoint file for predictor_path? Thank you for your time and assistance. Best regards, |
My apologies for the delay. Note that If you do in fact want to use counterfactual training, then you need to first train some classifiers/regressors for each parent of x which will give you the predictor checkpoint you're missing. This can be done using Best, |
Hi Fabio, |
Hi Fabio, I hope this message finds you well. I am writing to follow up on my previous request regarding the plotting code for the example result from the UKBB dataset mentioned on the GitHub page. Your work has been incredibly insightful and has greatly benefited my project. I deeply appreciate the effort and expertise you have put into it. If you could share the plotting code, it would be immensely helpful and I would be very grateful. Thank you once again for your time and for your outstanding contributions. |
Thank you for sharing this project. Could you please specify which version of Python you used for this code? This will help me ensure compatibility and avoid any issues while running it.
The text was updated successfully, but these errors were encountered: