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

loosen bounds #119

Merged
merged 24 commits into from
Feb 23, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions src/Skcore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -173,26 +173,25 @@ function import_sklearn()
# check for existence of mkl-service.
# Numpy, sklearn, etc. requires either `mkl` or `no-mkl` service to run
# By default Conda comes with mkl
# For this package to run on MacOS the `no-mkl` versions of Numpy, sklearn is needed
pyimport("mkl")
# For this package to run on MacOS, the `no-mkl` versions of Numpy, sklearn are needed
pyimport("mkl") # goes to catch block if "mkl" doesn't exist on the users Mac

#following Code runs only if mkl-service exists otherwise jumps to catch branch
# following Code runs only if mkl-service exists otherwise jumps to catch branch
@info "Installing non-mkl versions of sci-kit learn via Conda"
#use non-mkl versions of python packages when ENV["PYTHON"]="Conda" or "" is used
#when a different non-conda local python is used everthing works fine
# Use non-mkl versions of python packages when ENV["PYTHON"]="Conda" or "" is used
# When a different non-conda local python is used everthing works fine
Conda.add("nomkl")
Conda.rm("mkl")#This also removes mkl-service
#force reinstall of scikit-learn replacing any previous mkl version
Conda.add("scikit-learn")
Conda.add("openblas")
Conda.add("llvm-openmp", channel = "conda-forge")
mkl_checked = true
catch
mkl_checked = true
end
catch err
## This block is reached when `mkl` pkg isn't installed.
OkonSamuel marked this conversation as resolved.
Show resolved Hide resolved
end
# force reinstall of scikit-learn replacing any previous mkl version
Conda.add("scikit-learn>=1.2,<1.3", channel="conda-forge")
#Conda.add("openblas")
#Conda.add("llvm-openmp", channel = "conda-forge")
mkl_checked = true
end
Conda.add("llvm-openmp", channel = "conda-forge")
PyCall.pyimport_conda("sklearn", "scikit-learn")
PyCall.pyimport_conda("sklearn", "scikit-learn>=1.2,<1.3", "conda-forge")

catch
@info("scikit-learn isn't properly installed."*
Expand All @@ -207,7 +206,7 @@ function import_sklearn()
Conda.add("libstdcxx-ng$version", channel="conda-forge")
if version == ">=3.4,<12.0"
# https://github.com/scikit-learn/scikit-learn/pull/23990
Conda.add("scikit-learn<1.1", channel="conda-forge")
Conda.add("scikit-learn>=1.2,<1.3", channel="conda-forge")
end
libstdcxx_solved = true
end
Expand Down