rpoleski / MulensModel

Microlensing Modelling package
https://rpoleski.github.io/MulensModel/
Other
54 stars 16 forks source link

Automatically compile code #143

Open jdeast opened 2 weeks ago

jdeast commented 2 weeks ago

With conda?

rpoleski commented 2 weeks ago

You mean to makefiles in source/VBBL/ and source/AdaptiveContouring? I don't know what's the purpose of conda, but I'm not against it. Note - people mostly use PyPI and then these Makefiles are ignored.

jdeast commented 2 weeks ago

My (limited) understanding is that pip can install code, but can't compile anything. Conda can do both, making the install easier. Conda is also required to install pymc (for that reason), so we're only simplifying the installation instructions.

rpoleski commented 2 weeks ago

For clarity - currently we're importing C and C++ code using setuptools.Extension when MM is installed using PIP. @jdeast do you want to configure conda yourself?

jdeast commented 2 weeks ago

I want it to work with 1 command, e.g.,

conda install exozippy

or

conda install mulensmodel

I don't know how to do that (yet?), but I'm pretty sure it's possible, and I don't think it's possible with pip. I'm sure I can figure it out if you don't already know how do to that.

rpoleski commented 2 weeks ago
pip install MulensModel

works. I don't know enough about conda to add this option.

jdeast commented 2 weeks ago

But then I have to go to the vbbl directory and type make.

rpoleski commented 2 weeks ago

No. There are 2 parallel wrappers for VBBL. One is using Extensions (and that one is used by PIP) and the other that compiles the code with appropriate flags (from Makefile; "installation" using PYTHONPATH).

jdeast commented 2 weeks ago

I don't understand the difference. When I pip install and run it, I get warnings related to not having run make in the vbbl directory.

On Tue, Jul 9, 2024, 1:25 AM Radek Poleski @.***> wrote:

No. There are 2 parallel wrappers for VBBL. One is using Extensions (and that one is used by PIP) and the other that compiles the code with appropriate flags (from Makefile; "installation" using PYTHONPATH).

— Reply to this email directly, view it on GitHub https://github.com/rpoleski/MulensModel/issues/143#issuecomment-2216577958, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQT2B5JIVZLW4TYYJDGMFLZLNX53AVCNFSM6AAAAABKQ2PS22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJWGU3TOOJVHA . You are receiving this because you were mentioned.Message ID: @.***>

rpoleski commented 2 weeks ago

That means that somehow PIP didn't fully work. Can you uninstall MM, install it once more, and copy-paste full output here (or send me via email)? It also means that the warning is not clear enough - we have not thought that pip install may fail.

jdeast commented 2 weeks ago

Right, I wasn't using pip. I cloned the repo because we haven't pushed all the updates to pypi which we needed.

However, when I install it via pip, I get an error about not having the right shape, which I ran into before:

ValueError: could not broadcast input array from shape (38568,) into shape (38166,)

Of that error, Jennifer said: "You need to switch to mm v3. But maybe I should try to fix it in master." We should probably update the version on pypi too.

On Tue, Jul 9, 2024 at 5:54 AM Radek Poleski @.***> wrote:

That means that somehow PIP didn't fully work. Can you uninstall MM, install it once more, and copy-paste full output here (or send me via email)? It also means that the warning is not clear enough - we have not thought that pip install may fail.

— Reply to this email directly, view it on GitHub https://github.com/rpoleski/MulensModel/issues/143#issuecomment-2217201884, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQT2B6NKEI4QQGIVQDFJPLZLOXNLAVCNFSM6AAAAABKQ2PS22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJXGIYDCOBYGQ . You are receiving this because you were mentioned.Message ID: @.***>

rpoleski commented 2 weeks ago

Please post full error message.

jdeast commented 1 week ago

This happens with the default pip installation running example 5. It's a known issue with a known fix, but we need to update the version on the master branch and pypi

On Tue, Jul 9, 2024 at 12:32 PM Radek Poleski @.***> wrote:

Please post full error message.

— Reply to this email directly, view it on GitHub https://github.com/rpoleski/MulensModel/issues/143#issuecomment-2218147999, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQT2BZHAAFBW33KGJ6VBYTZLQGB5AVCNFSM6AAAAABKQ2PS22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJYGE2DOOJZHE . You are receiving this because you were mentioned.Message ID: @.***>

rpoleski commented 1 week ago

I've just installed MM by calling pip install MulensModel then I've run example 05. I got a bunch of warnings about calculating log10() of negative numbers (but these are caused by the data and model used). No error was reported. What's the problem? @jenniferyee can you comment on that?