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

Add test to check for warnings #41

Merged
merged 14 commits into from
Jun 5, 2022
Merged

Add test to check for warnings #41

merged 14 commits into from
Jun 5, 2022

Conversation

maresb
Copy link
Contributor

@maresb maresb commented Jun 4, 2022

Closes #40 by bumping build number

Adds a post-build test to ensure that pymc imports without warnings (e.g. compiler not found).

Attn: @michaelosthege

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@maresb
Copy link
Contributor Author

maresb commented Jun 4, 2022

@conda-forge-admin, please rerender

@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2022

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/pymc-feedstock/actions/runs/2440243349.

@maresb
Copy link
Contributor Author

maresb commented Jun 4, 2022

xref: #37 (comment)

@maresb
Copy link
Contributor Author

maresb commented Jun 4, 2022

My test already bears fruit!

Under Windows:

(%PREFIX%) %SRC_DIR%>python check-for-warnings.py 
The following warnings were emitted but not allowed:

    WARNING (aesara.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
    
Please either fix them or add them to the ALLOWED_WARNINGS list in check-for-warnings.py.

Do we want Windows users to have a different BLAS implementation?

Or do we want to allow this warning?

@michaelosthege
Copy link
Contributor

I tried the install command from our Wiki page which is currently this:

conda create -n pmv4 -c conda-forge pymc libpython mkl-service numba m2w64-toolchain

The import gives me no NumPy C-backend warning, but a ton of other scary warnings:

(pmv4) C:\>python -c "import pymc"
Could not locate executable g77
Could not locate executable f77
Could not locate executable ifort
Could not locate executable ifl
Could not locate executable f90
Could not locate executable DF
Could not locate executable efl
Using built-in specs.
COLLECT_GCC=C:\Users\zufal\Miniconda3\envs\pmv4\Library\mingw-w64\bin\gfortran.exe
COLLECT_LTO_WRAPPER=C:/Users/zufal/Miniconda3/envs/pmv4/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-5.3.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --with-gxx-include-dir=/mingw64/include/c++/5.3.0 --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev5, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 5.3.0 (Rev5, Built by MSYS2 project)

(pmv4) C:\>

My aesara.config.blas__ldflags setting is different to the one recommended in the Wiki as the solution for the NumPy C-backend warning:

>>> aesara.config.blas__ldflags
'-L"C:\\Users\\zufal\\Miniconda3\\envs\\pmv4\\Library\\bin" -lmkl_core -lmkl_intel_thread -lmkl_rt'

I believe this is good, because it means I actually got the faster backend through some of the extra dependencies from the install command?

But the other print statements look scary. This is the corresponding ticket: conda-forge/aesara-feedstock#54

@maresb
Copy link
Contributor Author

maresb commented Jun 4, 2022

That's interesting. What happens if you do conda create with only pymc? (I'm not on Windows, so I have to rely on you.)

For reference, here are Aesera's BLAS instructions

Since m2w64-toolchain is now a direct dependency of pymc it's redundant to add it to the conda install command.

Then I'm wondering what is the purpose of each of the three additional libraries: libpython mkl-service numba? Are these indeed optional but recommended? Is there any documentation about what is the difference running PyMC with/without each?

@maresb
Copy link
Contributor Author

maresb commented Jun 4, 2022

It would be really nice if we could get the install process as simple, streamlined, and reliable as possible! 😄

Of course there will always be tradeoffs between speed and disk usage and licensing, but it feels rather confusing right now how to make an informed decision. (But I may be missing some docs...)

@michaelosthege
Copy link
Contributor

Some time ago I tried a lot of different combinations and found that adding numba was one of the tricks to get a good installation.

This is the result of creating an env with conda create -n pm4only -c conda-forge pymc -y.
Here it has the warning.

(pm4only) C:\>python -c "import pymc"
WARN: Could not locate executable g77
WARN: Could not locate executable f77
WARN: Could not locate executable ifort
WARN: Could not locate executable ifl
WARN: Could not locate executable f90
WARN: Could not locate executable DF
WARN: Could not locate executable efl
Using built-in specs.
COLLECT_GCC=C:\Users\zufal\Miniconda3\envs\pm4only\Library\mingw-w64\bin\gfortran.exe
COLLECT_LTO_WRAPPER=C:/Users/zufal/Miniconda3/envs/pm4only/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-5.3.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --with-gxx-include-dir=/mingw64/include/c++/5.3.0 --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev5, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 5.3.0 (Rev5, Built by MSYS2 project)
WARNING (aesara.tensor.blas): Using NumPy C-API based implementation for BLAS functions.

(pm4only) C:\>

I'll try some more combinations, hang on

@maresb
Copy link
Contributor Author

maresb commented Jun 4, 2022

Do you have a ${HOME}/.aesararc? This seems to me like a massive potential source for side-effects 😨

@michaelosthege
Copy link
Contributor

michaelosthege commented Jun 4, 2022

No I don't have a .aesararc, but good call to double check!


mkl-service does the trick:

conda create -n pm4mklservice -c conda-forge pymc mkl-service -y

...

(pm4mklservice) C:\>python -c "import pymc"
WARN: Could not locate executable g77
WARN: Could not locate executable f77
WARN: Could not locate executable ifort
WARN: Could not locate executable ifl
WARN: Could not locate executable f90
WARN: Could not locate executable DF
WARN: Could not locate executable efl
Using built-in specs.
COLLECT_GCC=C:\Users\zufal\Miniconda3\envs\pm4mklservice\Library\mingw-w64\bin\gfortran.exe
COLLECT_LTO_WRAPPER=C:/Users/zufal/Miniconda3/envs/pm4mklservice/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-5.3.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --with-gxx-include-dir=/mingw64/include/c++/5.3.0 --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev5, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 5.3.0 (Rev5, Built by MSYS2 project)

(pm4mklservice) C:\>

@maresb
Copy link
Contributor Author

maresb commented Jun 4, 2022

Cool, so installing mkl-service resolves WARNING (aesara.tensor.blas): Using NumPy C-API based implementation for BLAS functions. ✔️

That is a very large package on Windows, right? So probably it makes sense to leave this as "optional but recommended", right?

@maresb
Copy link
Contributor Author

maresb commented Jun 4, 2022

Then it is somewhat mysterious why you have a warning about those missing executables but it doesn't show on the GitHub CI 🤔

@michaelosthege
Copy link
Contributor

I wouldn't worry about the size.
Good UX is much more important, and everybody loves fast MCMC chains.

@maresb
Copy link
Contributor Author

maresb commented Jun 4, 2022

Shall we make mkl-service a runtime requirement of the Conda package on Windows? On all platforms?

BTW, I just looked more closely into the CI logs:

(%PREFIX%) %SRC_DIR%>"%PREFIX%\python.exe" -s "%SRC_DIR%\run_test.py" 
import: 'pymc'
WARN: Could not locate executable g77
WARN: Could not locate executable f77
WARN: Could not locate executable ifort
WARN: Could not locate executable ifl
WARN: Could not locate executable f90
WARN: Could not locate executable efl
Using built-in specs.
COLLECT_GCC=D:\bld\pymc_1654361208859\_test_env\Library\mingw-w64\bin\gfortran.exe
COLLECT_LTO_WRAPPER=D:/bld/pymc_1654361208859/_test_env/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-5.3.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --with-gxx-include-dir=/mingw64/include/c++/5.3.0 --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev5, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 5.3.0 (Rev5, Built by MSYS2 project) 
WARNING (aesara.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
Matplotlib is building the font cache; this may take a moment.

Ah!!! I'm not parsing that because I'm looking for WARNING not WARN. Mystery solved! 😂

@danhphan
Copy link

danhphan commented Jun 5, 2022

Yes, I think we should include mkl-service to fix the numpy blas warnings.

I added both libblas and mkl-service in environment-dev.yml file when setup pymc docker image in ubuntu. It is discussed in
pymc-devs/pymc#5323

@maresb
Copy link
Contributor Author

maresb commented Jun 5, 2022

I'm thinking we should change the recipe to define two outputs: pymc-base and pymc, where pymc-base omits even the compilers and pymc is the recommended batteries-included config.

@twiecki
Copy link
Contributor

twiecki commented Jun 5, 2022 via email

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@maresb
Copy link
Contributor Author

maresb commented Jun 5, 2022

I think I managed to set the selector correctly. We should probably render the builds as artifacts so we can download them in order to test the M1 builds.

I'm not sure what's going on, but for some reason the tests run only for pymc-base and not for pymc:

Nothing to test for: /home/conda/feedstock_root/build_artifacts/linux-64/pymc-4.0.0-py310hba2d53b_1.tar.bz2

I'll have to look into it on another day.

@twiecki
Copy link
Contributor

twiecki commented Jun 5, 2022

@maresb This looks great! Can we still merge? We plan to announce tomorrow and having a pymc conda-forge that works across OS'es would be amazing.

@twiecki twiecki merged commit cd10286 into conda-forge:main Jun 5, 2022
@maresb
Copy link
Contributor Author

maresb commented Jun 6, 2022

@twiecki my tests for pymc were not running, so much more likely than not things are broken. 🙁

@twiecki
Copy link
Contributor

twiecki commented Jun 6, 2022

@maresb I tried it on osx and it worked. As long as the right packages are getting installed, things should be fine, no?

@twiecki
Copy link
Contributor

twiecki commented Jun 6, 2022

I also noticed that pymc also pulled in pymc-base, is that correct?

@maresb
Copy link
Contributor Author

maresb commented Jun 6, 2022

Osx M1 or Intel?

Pymc = pymc-base + compilers, blas, etc.

@twiecki
Copy link
Contributor

twiecki commented Jun 6, 2022

M1

@maresb
Copy link
Contributor Author

maresb commented Jun 6, 2022

To be more precise, pymc-base is the python package plus the python dependencies, and nothing more.

Great that M1 is working!

@maresb
Copy link
Contributor Author

maresb commented Jun 6, 2022

I can confirm that on Linux I can import pymc without warnings after installing pymc. 🎉

Anyone capable of testing Windows? @michaelosthege?

It would be nice to also test inference for some extremely basic model here on Conda-Forge, just to make sure that that doesn't trigger any warnings either.

@maresb
Copy link
Contributor Author

maresb commented Jun 6, 2022

I'm still very confused why the tests aren't running for the pymc package, and I don't have time to investigate at the moment.

@michaelosthege
Copy link
Contributor

I can confirm that the BLAS warning is now gone on Windows.

This leaves us with the other warnings which are an Aesara issue.

@maresb maresb mentioned this pull request Jun 6, 2022
5 tasks
@danhphan
Copy link

danhphan commented Jun 7, 2022

Hi, I've just tested install PyMC v4 on Ubuntu 20.04

The installation using this conda install -c conda-forge pymc command still show pymc-2.3.8 version.

danh@danh-ubuntu:~/WORK/codes$ conda activate pymc_v4
(pymc_v4) danh@danh-ubuntu:~/WORK/codes$ 
(pymc_v4) danh@danh-ubuntu:~/WORK/codes$ conda install -c conda-forge pymc
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/danh/miniconda3/envs/pymc_v4

  added / updated specs:
    - pymc


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    libblas-3.9.0              |15_linux64_openblas          12 KB  conda-forge
    libcblas-3.9.0             |15_linux64_openblas          12 KB  conda-forge
    liblapack-3.9.0            |15_linux64_openblas          12 KB  conda-forge
    numpy-1.22.3               |   py39hc58783e_2         6.8 MB  conda-forge
    pymc-2.3.8                 |   py39h1212d47_2         985 KB  conda-forge
    scipy-1.8.1                |   py39he49c0e8_0        24.9 MB  conda-forge
    ------------------------------------------------------------
                                           Total:        32.7 MB

The following NEW packages will be INSTALLED:

  libblas            conda-forge/linux-64::libblas-3.9.0-15_linux64_openblas
  libcblas           conda-forge/linux-64::libcblas-3.9.0-15_linux64_openblas
  libgfortran-ng     conda-forge/linux-64::libgfortran-ng-12.1.0-h69a702a_16
  libgfortran5       conda-forge/linux-64::libgfortran5-12.1.0-hdcd56e2_16
  liblapack          conda-forge/linux-64::liblapack-3.9.0-15_linux64_openblas
  libopenblas        conda-forge/linux-64::libopenblas-0.3.20-pthreads_h78a6416_0
  numpy              conda-forge/linux-64::numpy-1.22.3-py39hc58783e_2
  pymc               conda-forge/linux-64::pymc-2.3.8-py39h1212d47_2
  python_abi         conda-forge/linux-64::python_abi-3.9-2_cp39
  scipy              conda-forge/linux-64::scipy-1.8.1-py39he49c0e8_0

The following packages will be UPDATED:

  ca-certificates    pkgs/main::ca-certificates-2022.4.26-~ --> conda-forge::ca-certificates-2022.5.18.1-ha878542_0

The following packages will be SUPERSEDED by a higher-priority channel:

  certifi            pkgs/main::certifi-2022.5.18.1-py39h0~ --> conda-forge::certifi-2022.5.18.1-py39hf3d152e_0
  openssl              pkgs/main::openssl-1.1.1o-h7f8727e_0 --> conda-forge::openssl-1.1.1o-h166bdaf_0


Proceed ([y]/n)? ^C
CondaSystemExit: 
Operation aborted.  Exiting.

@danhphan
Copy link

danhphan commented Jun 7, 2022

After specify exact version of PyMC 4.0.0, it can collect the right versions:

(pymc_v4) danh@danh-ubuntu:~/WORK/codes$ conda install -c conda-forge pymc=4.0.0
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/danh/miniconda3/envs/pymc_v4

  added / updated specs:
    - pymc=4.0.0


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    aesara-2.6.6               |   py39h788985e_0         1.9 MB  conda-forge
    binutils-2.36.1            |       hdd6e379_2          27 KB  conda-forge
    c-compiler-1.4.2           |       h166bdaf_0           5 KB  conda-forge
    curl-7.79.1                |       h2574ce0_1         153 KB  conda-forge
    cxx-compiler-1.4.2         |       h924138e_0           5 KB  conda-forge
    gcc-10.3.0                 |      he2824d0_10          24 KB  conda-forge
    gxx-10.3.0                 |      he2824d0_10          24 KB  conda-forge
    libblas-3.9.0              |15_linux64_openblas          12 KB  conda-forge
    libcblas-3.9.0             |15_linux64_openblas          12 KB  conda-forge
    liblapack-3.9.0            |15_linux64_openblas          12 KB  conda-forge
    mkl-service-2.4.0          |   py39h404a4ab_0          62 KB  conda-forge
    numpy-1.22.3               |   py39hc58783e_2         6.8 MB  conda-forge
    pandas-1.4.2               |   py39h1832856_1        12.5 MB  conda-forge
    pillow-8.3.2               |   py39ha612740_0         701 KB  conda-forge
    pymc-4.0.0                 |   py39ha563b64_1           8 KB  conda-forge
    pymc-base-4.0.0            |   py39hf3d152e_1         917 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        23.1 MB

However, after the installation, the numpy blas warning is still there:

(pymc_v4) danh@danh-ubuntu:~/WORK/codes$ python
Python 3.9.12 (main, Jun  1 2022, 11:38:51) 
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymc as pm
WARNING (aesara.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
>>> print(pm.__version__)
4.0.0
>>> import aesara as ae
>>> print(ae.__version__)
2.6.6

@twiecki
Copy link
Contributor

twiecki commented Jun 7, 2022

@danhphan Very odd, can you open a new issue?

@maresb
Copy link
Contributor Author

maresb commented Jun 7, 2022

Hi @danhphan, I have a few suggestions for you...

It looks like you are installing the latest pymc to an existing environment, and this environment already has a lot of existing stuff (e.g. openblas) which is probably interfering with the latest version of pymc. I would recommend instead creating a fresh environment with

conda create --name pymc-test -c conda-forge pymc

When I do this on Ubuntu 20.04 I get the correct packages and no warnings.

In case you want to choose your own BLAS, then you should instead install pymc-base and configure the compiler and BLAS yourself.

You will have much better performance when solving the environment if you use Mamba, which is a drop-in replacement for conda. Namely,

mamba create --name pymc-test -c conda-forge pymc

Finally, to ensure that you're installing the best version, on the command line you can specify

mamba create --name pymc-test -c conda-forge "pymc >=4.0.0"

where the quotes are necessary because Bash would otherwise interpret the > character as a redirect and pipe the output to a file called =4.0.0. 😄

@danhphan
Copy link

danhphan commented Jun 7, 2022

Sorry, I should have also included the previous command.

It was a new conda environment, and I use this conda command: conda create -n pymc_v4 python=3.9 to create it. I've just checked the command history here:

 1674  conda create -n pymc_v4 python=3.9
 1675  conda activate pymc_v4
 1676  conda install -c conda-forge pymc # Which points to pymc-2.3.8
 1677  conda install -c conda-forge pymc=4.0.0

@danhphan
Copy link

danhphan commented Jun 7, 2022

Hi, confirm that using this command conda create --name pymc-test -c conda-forge pymc works. It collects the right pymc-4.0.0

danh@danh-ubuntu:~$ conda create --name pymc-test -c conda-forge pymc
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/danh/miniconda3/envs/pymc-test

  added / updated specs:
    - pymc


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    aesara-2.6.6               |  py310h75a063d_0         1.9 MB  conda-forge
    certifi-2022.5.18.1        |  py310hff52083_0         150 KB  conda-forge
    cftime-1.6.0               |  py310hde88566_1         220 KB  conda-forge
    curl-7.83.1                |       h2283fc2_0          89 KB  conda-forge
    fonttools-4.33.3           |  py310h5764c6d_0         1.6 MB  conda-forge
    hdf5-1.12.1                |nompi_h4df4325_104         3.6 MB  conda-forge
    importlib-metadata-4.11.4  |  py310hff52083_0          33 KB  conda-forge
    kiwisolver-1.4.2           |  py310hbf28c38_1          75 KB  conda-forge
    krb5-1.19.3                |       h08a2579_0         1.4 MB  conda-forge
    libcurl-7.83.1             |       h2283fc2_0         344 KB  conda-forge
    libnghttp2-1.47.0          |       he49606f_0         824 KB  conda-forge
    libssh2-1.10.0             |       ha35d2d1_2         233 KB  conda-forge
    libtiff-4.4.0              |       h0fcbabc_0         606 KB  conda-forge
    libzip-1.8.0               |       h1c5bbd1_1         126 KB  conda-forge
    matplotlib-base-3.5.2      |  py310h5701ce4_0         7.4 MB  conda-forge
    mkl-2022.1.0               |     h84fe81f_915       199.6 MB  conda-forge
    mkl-service-2.4.0          |  py310hd16d89b_0          62 KB  conda-forge
    netcdf4-1.5.8              |nompi_py310hd7ca5b8_101         2.7 MB  conda-forge
    numpy-1.22.4               |  py310h4ef5377_0         6.8 MB  conda-forge
    openssl-3.0.3              |       h166bdaf_0         2.9 MB  conda-forge
    pandas-1.4.2               |  py310h769672d_2        12.5 MB  conda-forge
    pillow-9.1.1               |  py310he619898_1        44.8 MB  conda-forge
    pymc-4.0.0                 |  py310hba2d53b_1           8 KB  conda-forge
    pymc-base-4.0.0            |  py310hff52083_1         927 KB  conda-forge
    python-3.10.4              |h2660328_0_cpython        28.6 MB  conda-forge
    python_abi-3.10            |          2_cp310           4 KB  conda-forge
    scipy-1.7.3                |  py310hea5193d_0        78.6 MB  conda-forge
    setuptools-62.3.2          |  py310hff52083_0         1.3 MB  conda-forge
    tbb-2021.5.0               |       h924138e_1         1.9 MB  conda-forge
    unicodedata2-14.0.0        |  py310h5764c6d_1         496 KB  conda-forge
    ------------------------------------------------------------
                                           Total:       399.7 MB

@danhphan
Copy link

danhphan commented Jun 7, 2022

The is no blas warningd when installing with this command conda create --name pymc-test -c conda-forge pymc as well.

So I am not sure why there is an above issue if we create a (new) conda environment first, then install the pymc package, as follow:

conda create -n pymc_v4 python=3.9
conda activate pymc_v4
conda install -c conda-forge pymc=4.0.0 # leads to blas warning

@maresb
Copy link
Contributor Author

maresb commented Jun 7, 2022

@danhphan, thanks for the clear instructions, I can reproduce the issue.

I can fix the problem by replacing condamamba. Does this work for you?

I don't have time at the moment to look into this more deeply. I'll try to find some time later tonight.

But since this is confirmed, could you please open a new issue?

@danhphan
Copy link

danhphan commented Jun 7, 2022

Hi thanks, I have opened a new issue at #43

Not sure if this is the right way to run mamba, but I run the following commands, and it points to the right pymc 4.0.0 version.

conda create --name pymc4 python=3.9
conda activate pymc4
conda install -c conda-forge mamba
mamba install -c conda-forge pymc

However, there is still the blas warnings:

(pymc4) danh@danh-ubuntu:~$ python
Python 3.9.12 (main, Jun  1 2022, 11:38:51) 
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymc as pm
WARNING (aesara.tensor.blas): Using NumPy C-API based implementation for BLAS functions.

@twiecki
Copy link
Contributor

twiecki commented Jun 7, 2022

I guess MKL is not getting installed?

@danhphan
Copy link

danhphan commented Jun 8, 2022

Yes, when using mamba install -c conda-forge pymc, the MKL stuffs (mkl, mkl-service) have been collected and installed.

(pymc4) danh@danh-ubuntu:~$ conda list | grep mkl
mkl                       2022.0.1           h06a4308_117  
mkl-service               2.4.0            py39h404a4ab_0    conda-forge

So the mkl is there, but I'm not sure why there is still blas warnings when import pymc.

Result when runnning mamba install -c conda-forge pymc as follow:

(pymc4) danh@danh-ubuntu:~$ mamba install -c conda-forge pymc

# Removed some stuffs
Looking for: ['pymc']

pkgs/main/noarch         [====================] (00m:00s) Done
pkgs/r/noarch            [====================] (00m:00s) Done
pkgs/r/linux-64          [====================] (00m:00s) Done
pkgs/main/linux-64       [====================] (00m:01s) Done
conda-forge/noarch       [====================] (00m:02s) Done
conda-forge/linux-64     [====================] (00m:13s) Done

Pinned packages:
  - python 3.9.*


Transaction

  Prefix: /home/danh/miniconda3/envs/pymc4

  Updating specs:

   - pymc
   - ca-certificates
   - certifi
   - openssl


  Package                      Version  Build                   Channel                    Size
─────────────────────────────────────────────────────────────────────────────────────────────────
  Install:
─────────────────────────────────────────────────────────────────────────────────────────────────

  + aeppl                       0.0.31  pyhd8ed1ab_0            conda-forge/noarch        40 KB
  + aesara                       2.6.6  py39h788985e_0          conda-forge/linux-64       2 MB
  + arviz                       0.12.1  pyhd8ed1ab_0            conda-forge/noarch         1 MB
# Removed several rows....
  + mkl                       2022.0.1  h06a4308_117            pkgs/main/linux-64       128 MB
  + mkl-service                  2.4.0  py39h404a4ab_0          conda-forge/linux-64      62 KB
  + multipledispatch             0.6.0  py_0                    conda-forge/noarch        12 KB
  + munkres                      1.1.4  pyh9f0ad1d_0            conda-forge/noarch        12 KB
  + netcdf4                      1.5.8  nompi_py39h64b754b_101  conda-forge/linux-64     560 KB
  + numpy                       1.22.3  py39hc58783e_2          conda-forge/linux-64       7 MB
  + olefile                       0.46  pyh9f0ad1d_1            conda-forge/noarch        32 KB
  + openjpeg                     2.4.0  hb52868f_1              conda-forge/linux-64     444 KB
  + packaging                     21.3  pyhd8ed1ab_0            conda-forge/noarch        36 KB
  + pandas                       1.4.2  py39h1832856_1          conda-forge/linux-64      12 MB
  + pillow                       8.3.2  py39ha612740_0          conda-forge/linux-64     701 KB
  + pymc                         4.0.0  py39ha563b64_1          conda-forge/linux-64       8 KB
  + pymc-base                    4.0.0  py39hf3d152e_1          conda-forge/linux-64     917 KB
  + pyparsing                    3.0.9  pyhd8ed1ab_0            conda-forge/noarch        79 KB
  + python-dateutil              2.8.2  pyhd8ed1ab_0            conda-forge/noarch       240 KB
  + pytz                        2022.1  pyhd8ed1ab_0            conda-forge/noarch       242 KB
  + scipy                        1.7.3  py39hee8e79c_0          conda-forge/linux-64      22 MB
  + sysroot_linux-64              2.12  he073ed8_15             conda-forge/noarch        31 MB
  + toolz                       0.11.2  pyhd8ed1ab_0            conda-forge/noarch        48 KB
  + typing-extensions         3.10.0.2  hd8ed1ab_0              conda-forge/noarch         8 KB
  + typing_extensions         3.10.0.2  pyha770c72_0            conda-forge/noarch        28 KB
  + unicodedata2                14.0.0  py39hb9d737c_1          conda-forge/linux-64     498 KB
  + xarray                    2022.3.0  pyhd8ed1ab_0            conda-forge/noarch       650 KB
  + xarray-einstats              0.2.2  pyhd8ed1ab_0            conda-forge/noarch        32 KB
  + zipp                         3.8.0  pyhd8ed1ab_0            conda-forge/noarch        12 KB

  Downgrade:
─────────────────────────────────────────────────────────────────────────────────────────────────

  - ld_impl_linux-64              2.38  h1181459_1              installed                      
  + ld_impl_linux-64            2.36.1  hea4e1c9_2              conda-forge/linux-64     667 KB

  Summary:

  Install: 84 packages
  Downgrade: 1 packages

  Total download: 333 MB

─────────────────────────────────────────────────────────────────────────────────────────────────

@maresb
Copy link
Contributor Author

maresb commented Jun 9, 2022

Solution proposed in #43

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

Successfully merging this pull request may close these issues.

Accidental early release of 4.0.0 due to branch
5 participants