Comments (5)
Thanks for the report. That's because the module you see in the build
folder is an internal module (that's why it's called _operon
) that binds the methods from the C++ library almost 1:1. The internal module is wrapped by a pure python module operon
which additionally provides the sklearn estimator.
Normally, you would provide an install prefix with -DCMAKE_INSTALL_PREFIX=/path/to/module
and then run make install
when the build is done. /path/to/module
should be in the PYTHONPATH
so python can pick it up.
I can update the install script but I would need to know where you want it installed.
EDIT: also, if you don't provide an install prefix the CMake script will try to figure out your python library path and install the module there (in this case it might be necessary to sudo make install
). The install script will copy the dll and the pure python module from here into your desired install folder.
from operon.
Operon should end up in $CONDA_PREFIX/lib/python3.9/site-packages
. I just tried providing this as an argument to -DCMAKE_INSTALL_PREFIX with no luck. I also tried creating a test_dir
in the operon directory and specifying that, but no files were copied there. I do see the line "-- Python bindings will be installed in /path/to/operon/test_dir
" during Cmake build, so maybe it is failing silently.
Could be nice to have the python module install as a python package using a minimal setup.py
script and a call to python setup.py install
.
from operon.
This install script works on my ubuntu machine. It seems that CMake is able to detect the correct library path, so I'd recommend omitting CMAKE_INSTALL_PREFIX
option so that we don't hardcode the python version.
The module import failure was caused by a name conflict, the file regression-benchmark/experiment/methods/operon.py
should be renamed to something else like OperonRegressor.py
.
# Installing operon
export CC=gcc-9
export CXX=gcc-9
# Dependencies
# - TBB - installed via conda
# - Eigen- installed via conda
# - Ceres- installed via conda
# - {fmt}- installed via conda
git clone https://github.com/heal-research/operon
cd operon
git checkout 79617d76c97838d91293cff5d4e4fda7230b904b
# run cmake
mkdir build; cd build;
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_PYBIND=ON -DUSE_OPENLIBM=ON -DUSE_SINGLE_PRECISION=ON -DCERES_TINY_SOLVER=ON
# build
make VERBOSE=1 -j pyoperon
# install
make install
After configuring and installing and renaming the regressor, I was actually able to run a small experiment:
time python evaluate_model.py -ml OperonRegressor Poly-10.csv -seed 1234 -results_path ./results/
from operon.
ah ok. Adding make VERBOSE=1 -j pyoperon; make install
worked like a charm. and i've fixed the name conflict. Would be good to get this in the documentation. Thank you!
from operon.
Thanks! Just one last thing: it's maybe better to not fix the revision number in the install script, (at least not right now) since there are still some minor issues in the sklearn wrapper that need to be ironed out.
from operon.
Related Issues (20)
- TypeError: __init__(): incompatible constructor arguments HOT 1
- getting the build process to recognize a lower python version HOT 2
- ValueError: Input contains NaN, infinity or a value too large for dtype('float32'). HOT 3
- Add option to disable evolution / optimization of variable coefficients (fix coefficients to one) HOT 2
- Usage instructions for command line interface do not show all supported symbols for --enable-symbols and --disable-symbols. HOT 1
- Python bindings HOT 6
- Evidential regression? HOT 3
- Building python binding and packaging HOT 2
- building operon HOT 9
- Can't build on linux HOT 1
- buliding problem HOT 3
- error in cmake HOT 4
- double free or corruption (out) HOT 8
- Custom cost function HOT 3
- Question about running ctest based on the instructions in HACKING.md HOT 5
- Building operon fails with a compiler error HOT 2
- Where can I find a c++ example of using operon? HOT 5
- About implementing specific custom primitives HOT 7
- Typo in selection operator definition produces segfault on CLI HOT 1
- Update license and file headers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from operon.