MLResearchAtOSRAM / cause2e

The cause2e package provides tools for performing an end-to-end causal analysis of your data. Developed by Daniel Grünbaum (@dg46).
https://gitlab.com/causal-inference/working-group/-/wikis/home
MIT License
56 stars 4 forks source link

Windows installation #14

Closed dg46 closed 2 years ago

dg46 commented 2 years ago

Continuous integration pipeline works on ubuntu image, but changing to windows image results in errors (first is Java related, then some issue with multithreading in pytest when the unit tests are run). I am using cause2e on a windows machine for my own analyses, so I know that it can work. Will fix the pipeline so that CI ensures that cause2e is in a usable state for linux and windows users.

dg46 commented 2 years ago

For the Java issue: This is a known issue with javabridge (required by py-causal in the causal discovery step). As explained here, make sure you have JAVA SDK 8 installed and set your JAVA_HOME and JDK_HOME environment variables correctly. See cause2e's azure-pipelines.yml for an example.


Edit: The following more detailed instruction hopefully helps:

If you still get errors (look at pip output during javabridge installation, it should install version 1.0.19 without complaining), check this file for the corresponding error message. You will see where javabridge expects certain Java files to be. Use this to set JAVA_HOME and/or JDK_HOME accordingly before reinstalling javabridge.

As a reference, our azure pipeline correctly installs cause2e, after setting JDK_HOME. For further debugging, try comparing your set up with the software that is pre-installed on the build image.

dg46 commented 2 years ago

For the pytest issue: This seems related to the problem. Despite the continuing error messages, I was able to make all unit tests run as intended by removing a blocker in heatmap plotting. Since the issue only occurs in the CI pipeline, it should not cause problems to users.

dg46 commented 2 years ago

The issue will be closed once I have merged the changes into the main branch.