Giter Club home page Giter Club logo

Comments (5)

jameslamb avatar jameslamb commented on June 6, 2024 1

@NigamSomya To install the Python package from a local copy of LightGBM, run the following:

sh build-python.sh install

For details on how to customize that, follow the docs at https://github.com/microsoft/LightGBM/blob/master/python-package/README.rst. You can ask here if you have other questions or concerns.

from lightgbm.

NigamSomya avatar NigamSomya commented on June 6, 2024

Hi! Thanks that worked successfully, but it installed the package in this directory C:\Users\snigam\AppData\AppData2\Lib\site-packages\lightgbm\ which is not picking up the changes that I made to the dcg_calculator.cpp

Plus, when I cloned the source code in a different directory, I expected the command that you shared would install the necessary files in that directory only. Please help.

from lightgbm.

jameslamb avatar jameslamb commented on June 6, 2024

which is not picking up the changes that I made to the dcg_calculator.cpp

What evidence do you see the the changes you've made to LightGBM's source code are not being picked up in the Python package?

Just to be sure you understand...the Python package will not contain any .h or .cpp files. Those files are compiled into a shared library, lib_lightgbm.dll, that the Python package code calls.

If you run the command I show you from the root of the same repo where you changed any .cpp files in LightGBM, the resulting Python package will reflect your changes. Be sure you're doing that.

I expected the command that you shared would install the necessary files in that directory only.

The command I shared will build the lightgbm Python package and install it to where pip install on your system places packages by default.

If you want to control that more tightly, omit the install.

sh build-python.sh bdist_wheel

That will create a file with a name like lightgbm-4.3.0.99-py3-none-win_amd64.whl in the dist/ directory at the root of the LightGBM repo. That file is a Python wheel and you can install it to wherever you want.

from lightgbm.

NigamSomya avatar NigamSomya commented on June 6, 2024

Hi!
Because I am getting the same error (kMaxposition error), I also ran the command in the same directory where my source code is place but somehow it gets installed as if I am running the usual pip command to install the lightgbm (in the usual appdata directory).

Also, the same thing happened when I tried to use this command sh build-python.sh bdist_wheel. Couldn't find anything named lightgbm-4.3.0.99-py3-none-win_amd64.whl. Must have been installed in the default directory and it behaves like the usual lightgbm package.
I am not sure what I am doing wrong, can you please help me with this?

from lightgbm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.