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

Mamba related install issues #11435

Open
OriolAbril opened this issue Jun 24, 2024 · 8 comments
Open

Mamba related install issues #11435

OriolAbril opened this issue Jun 24, 2024 · 8 comments
Labels
Support Support question

Comments

@OriolAbril
Copy link
Contributor

Details

Expected Result

Only one version of pymc is installed, the 0+untagged.50.g09fd0d7.dirty (which is what gets installed with pip install .).

Actual Result

Somehow there are two versions of PyMC installed: 0+untagged.50.g09fd0d7.dirty and 5.15.1. The first seems to be preferred but the notebooks use the 2nd even though we are enforcing the kernel being used. Even more puzzling is both seem to point to the same source yet their contents are clearly different. Any hints to what might be happening or other places to open the issue will be very welcome. Some links I think illustrate the situation:

@humitos humitos added the Support Support question label Jun 24, 2024
@humitos
Copy link
Member

humitos commented Jun 24, 2024

(from the phone 📱)

Note that you are installing it twice: one on the Conda YAML file and another one in the Red the Docs YAML file (via python.install)

You should remove one of them.

@OriolAbril
Copy link
Contributor Author

pymc is not in the conda yaml file, only its dependencies. And you can see in the logs that it isn't in the library being installed by the mamba env create, it only appears in the mamba list I added as part of the post_install step, as it has been installed with pip install .

There is a pymc-sphinx-theme because we maintain multiple packages in addition to pymc that extend it so all common configuration we do of pydata-sphinx-theme is centralized there

@humitos
Copy link
Member

humitos commented Jun 25, 2024

pymc is not in the conda yaml file, only its dependencies.

Oh, yeah, I got confused with the last line of the YAML file that says: name: pymc-docs --but that's the name of the Mamba environment.

Somehow there are two versions of PyMC installed: 0+untagged.50.g09fd0d7.dirty and 5.15.1

Where do you see there are two version installed? I'm not finding that in the Read the Docs logs.

@OriolAbril
Copy link
Contributor Author

That is part of the issue, I don't see it in the logs, but some of the pages that execute code while generating the website do use this version as can be seen from https://pymcio--7385.org.readthedocs.build/projects/docs/en/7385/learn/core_notebooks/pymc_overview.html. I have no idea where that code is coming from. The version is wrong, if you inspect the signature of a function we modified recently it has the old signature (consistent with the version at least).

The output of that code snippet should be the one we do get in that other page (bottom of the page): https://pymcio--7385.org.readthedocs.build/projects/docs/en/7385/learn.html

@humitos
Copy link
Member

humitos commented Jun 25, 2024

I don't have knowledge of the intervals of this package, but if I would have to debug this, I'd start by tracking down how the version is generated by this line:

__version__ = _version.get_versions()["version"]

I suppose the package version differs from how that value is generated and that's why the mismatch.

With that information, we will know if this is a problem on Read the Docs environment of the package itself.

@OriolAbril
Copy link
Contributor Author

I don't think that is relevant here because the version is one of many things that are wrong. If there was an issue with that function, the version would be different, but the source would be the same. Somehow, there is a definition of sample_prior_predictive(samples,...) and another of sample_prior_predictive(draws,...), and what is worse is both seem to be on the same file.

I also added a comment to the __init__.py file to make sure there was noting strange in the git checkout process, and again the same. Printing the source dinamically with the inspect library shows the comment in one case but not in the other.

I will add a new commit to the debut PR hardcoding the version. And what I expect to happen is the page where the "right" version shows up will continue to show the "right" (now hardcoded) version whereas the other will show the same version, also showing __version__ = _version.get_versions()["version"] in the source when using inspect. I don't see any behavioural difference with the comment on __init__.py on this.

@OriolAbril
Copy link
Contributor Author

As the new commit will change the preview of the PR I have linked above, I'll also add screenshots here to keep the "history".

PR docs preview with commit 09fd0d7

learn.html page:

imatge

pymc_overview.html page:

imatge

@OriolAbril
Copy link
Contributor Author

I have had time to check the preview, and what I expected is what happened:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Support question
Projects
None yet
Development

No branches or pull requests

2 participants