From 8e18c02ed8164d5fdbeb7e7704cf9a1505b66c3c Mon Sep 17 00:00:00 2001 From: "Oriol (ProDesk)" Date: Mon, 24 Jun 2024 14:54:17 +0200 Subject: [PATCH 1/6] debug rtd build --- docs/source/conf.py | 4 ++-- docs/source/learn.md | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 5e6db35b3c7..0a4754ddd07 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -147,8 +147,8 @@ # myst config nb_execution_mode = "force" if on_readthedocs else "off" -nb_execution_allow_errors = False -nb_execution_raise_on_error = True +nb_execution_allow_errors = True +nb_execution_raise_on_error = False nb_execution_timeout = 300 nb_kernel_rgx_aliases = {".*": "python3"} myst_enable_extensions = ["colon_fence", "deflist", "dollarmath", "amsmath", "substitution"] diff --git a/docs/source/learn.md b/docs/source/learn.md index 3ddf82fa936..ede594af387 100644 --- a/docs/source/learn.md +++ b/docs/source/learn.md @@ -31,3 +31,11 @@ glossary - {octicon}`plug;1em;sd-text-info` Experimental and cutting edge functionality: {doc}`pmx:index` library - {octicon}`gear;1em;sd-text-info` PyMC internals guides (To be outlined and referenced here once [pymc#5538](https://github.com/pymc-devs/pymc/issues/5538) is addressed) + + +```{jupyter-execute} +import inspect +import pymc as pm +print(pm.__version__) +print(inspect.signature(pm.sample_prior_predictive)) +``` From ba509c6e19db4e65f8c8aa33e3d5d72daa14a3f8 Mon Sep 17 00:00:00 2001 From: "Oriol (ProDesk)" Date: Mon, 24 Jun 2024 15:30:59 +0200 Subject: [PATCH 2/6] compare myst and jupyter-execute kernels --- docs/source/learn.md | 3 +++ .../learn/core_notebooks/pymc_overview.ipynb | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/docs/source/learn.md b/docs/source/learn.md index ede594af387..5cb79241809 100644 --- a/docs/source/learn.md +++ b/docs/source/learn.md @@ -35,7 +35,10 @@ is addressed) ```{jupyter-execute} import inspect +import sys import pymc as pm +print(sys.executable) print(pm.__version__) print(inspect.signature(pm.sample_prior_predictive)) +print(inspect.getfile(pm)) ``` diff --git a/docs/source/learn/core_notebooks/pymc_overview.ipynb b/docs/source/learn/core_notebooks/pymc_overview.ipynb index 9b87db9c3de..2c89e4f39f2 100644 --- a/docs/source/learn/core_notebooks/pymc_overview.ipynb +++ b/docs/source/learn/core_notebooks/pymc_overview.ipynb @@ -16,6 +16,24 @@ ":::" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "d39aad1a", + "metadata": { + "lines_to_next_cell": 2 + }, + "outputs": [], + "source": [ + "import inspect\n", + "import sys\n", + "import pymc as pm\n", + "print(sys.executable)\n", + "print(pm.__version__)\n", + "print(inspect.signature(pm.sample_prior_predictive))\n", + "print(inspect.getfile(pm))" + ] + }, { "cell_type": "markdown", "metadata": {}, From 14ab9c4323d15c2625e6f19d06896ab770a2395f Mon Sep 17 00:00:00 2001 From: "Oriol (ProDesk)" Date: Mon, 24 Jun 2024 16:01:33 +0200 Subject: [PATCH 3/6] add check comment to init --- docs/source/learn.md | 2 ++ docs/source/learn/core_notebooks/pymc_overview.ipynb | 4 +++- pymc/__init__.py | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/source/learn.md b/docs/source/learn.md index 5cb79241809..c92893c5f84 100644 --- a/docs/source/learn.md +++ b/docs/source/learn.md @@ -41,4 +41,6 @@ print(sys.executable) print(pm.__version__) print(inspect.signature(pm.sample_prior_predictive)) print(inspect.getfile(pm)) +print("\n\n") +print(ispect.getsource(pm)) ``` diff --git a/docs/source/learn/core_notebooks/pymc_overview.ipynb b/docs/source/learn/core_notebooks/pymc_overview.ipynb index 2c89e4f39f2..434ea8ceb87 100644 --- a/docs/source/learn/core_notebooks/pymc_overview.ipynb +++ b/docs/source/learn/core_notebooks/pymc_overview.ipynb @@ -31,7 +31,9 @@ "print(sys.executable)\n", "print(pm.__version__)\n", "print(inspect.signature(pm.sample_prior_predictive))\n", - "print(inspect.getfile(pm))" + "print(inspect.getfile(pm))\n", + "print(\"\\n\\n\")\n", + "print(ispect.getsource(pm))" ] }, { diff --git a/pymc/__init__.py b/pymc/__init__.py index 83d147a3a95..a8b2b156188 100644 --- a/pymc/__init__.py +++ b/pymc/__init__.py @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# locally installed pymc from PR 7385 should have this line + import logging From 74196acb07e869892bb7c80aa9defaa810b9aba4 Mon Sep 17 00:00:00 2001 From: "Oriol (ProDesk)" Date: Mon, 24 Jun 2024 16:09:00 +0200 Subject: [PATCH 4/6] try mamba list --- .readthedocs.yml | 4 ++++ conda-envs/environment-docs.yml | 1 + docs/source/learn.md | 2 +- docs/source/learn/core_notebooks/pymc_overview.ipynb | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 5f9622efa41..4f17306ca9b 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -15,3 +15,7 @@ build: os: "ubuntu-22.04" tools: python: "mambaforge-4.10" + jobs: + post_install: + - mamba list + - which python diff --git a/conda-envs/environment-docs.yml b/conda-envs/environment-docs.yml index 02e28bd3c8c..84a98fb2dff 100644 --- a/conda-envs/environment-docs.yml +++ b/conda-envs/environment-docs.yml @@ -18,6 +18,7 @@ dependencies: - typing-extensions>=3.7.4 - threadpoolctl>=3.1.0 # Extra dependencies for docs build +- ipykernel - ipython>=7.16 - jax - jupyter-sphinx diff --git a/docs/source/learn.md b/docs/source/learn.md index c92893c5f84..21ad1f41932 100644 --- a/docs/source/learn.md +++ b/docs/source/learn.md @@ -42,5 +42,5 @@ print(pm.__version__) print(inspect.signature(pm.sample_prior_predictive)) print(inspect.getfile(pm)) print("\n\n") -print(ispect.getsource(pm)) +print(inspect.getsource(pm)) ``` diff --git a/docs/source/learn/core_notebooks/pymc_overview.ipynb b/docs/source/learn/core_notebooks/pymc_overview.ipynb index 434ea8ceb87..18a5061ec62 100644 --- a/docs/source/learn/core_notebooks/pymc_overview.ipynb +++ b/docs/source/learn/core_notebooks/pymc_overview.ipynb @@ -33,7 +33,7 @@ "print(inspect.signature(pm.sample_prior_predictive))\n", "print(inspect.getfile(pm))\n", "print(\"\\n\\n\")\n", - "print(ispect.getsource(pm))" + "print(inspect.getsource(pm))" ] }, { From 09fd0d70a229688fdf98e181c6cb70c9061e67fd Mon Sep 17 00:00:00 2001 From: "Oriol (ProDesk)" Date: Mon, 24 Jun 2024 16:32:54 +0200 Subject: [PATCH 5/6] try custom kernel --- .readthedocs.yml | 1 + docs/source/conf.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 4f17306ca9b..bf49844ce8d 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -19,3 +19,4 @@ build: post_install: - mamba list - which python + - python -m ipykernel install --user --name pymc-docs diff --git a/docs/source/conf.py b/docs/source/conf.py index 0a4754ddd07..c9b9041297e 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -146,11 +146,13 @@ ] # myst config +default_kernel = "pymc-docs" if on_readthedocs else "python3" nb_execution_mode = "force" if on_readthedocs else "off" nb_execution_allow_errors = True nb_execution_raise_on_error = False nb_execution_timeout = 300 -nb_kernel_rgx_aliases = {".*": "python3"} +nb_kernel_rgx_aliases = {".*": default_kernel} +jupyter_execute_default_kernel = default_kernel myst_enable_extensions = ["colon_fence", "deflist", "dollarmath", "amsmath", "substitution"] myst_substitutions = { "version_slug": rtd_version, From 163640aacfbbcb12017155a774b3f8e952bd88cc Mon Sep 17 00:00:00 2001 From: "Oriol (ProDesk)" Date: Tue, 25 Jun 2024 14:51:07 +0200 Subject: [PATCH 6/6] hardcode version --- pymc/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pymc/__init__.py b/pymc/__init__.py index a8b2b156188..e33f2048556 100644 --- a/pymc/__init__.py +++ b/pymc/__init__.py @@ -79,4 +79,5 @@ def __set_compiler_flags(): from pymc.variational import * from pymc.vartypes import * -__version__ = _version.get_versions()["version"] +# __version__ = _version.get_versions()["version"] +__version__ = "1.16.0.rtd0"