Giter VIP home page Giter VIP logo

Comments (8)

myron0330 avatar myron0330 commented on August 23, 2024 1

maybe it's better for the team to maintain the conda installation with higher versions.

from lightgbm.

myron0330 avatar myron0330 commented on August 23, 2024

It hungs at

bst = lgb.train(params, train_data, num_boost_round=10)

from lightgbm.

jameslamb avatar jameslamb commented on August 23, 2024

Thanks for using LightGBM.

If it hands on lgb.train(), then I guess the code after that line is not necessary, correct? If so, please remove it from the example.

Can you please share any logs produced by lightgbm prior to it "hanging"?

from lightgbm.

myron0330 avatar myron0330 commented on August 23, 2024

ok, thanks for your help. In fact, i had a model file and i just wanted to load it at beginning. It hanged at "lgb.Booster(model_file=model_path)" when loading, after that i tried the mini-case and it hanged at "lgb.train()".

By the way, what's the default log path by lightgbm? I will try to find more information tonight~

from lightgbm.

jameslamb avatar jameslamb commented on August 23, 2024

By the way, what's the default log path by lightgbm?

By default, lightgbm does not write logs to a file. It writes them directly to standard output (for example, printed in the terminal or the output below an executing Jupyter notebook cell).

from lightgbm.

myron0330 avatar myron0330 commented on August 23, 2024

it hangs at after print(1), at code _safe_call(_LIB.LGBM_BoosterCreateFromModelfile( _c_str(str(model_file)), ctypes.byref(out_num_iterations), ctypes.byref(self._handle)))

        elif model_file is not None:
            # Prediction task
            out_num_iterations = ctypes.c_int(0)
            print(1)
            _safe_call(_LIB.LGBM_BoosterCreateFromModelfile(
                _c_str(str(model_file)),
                ctypes.byref(out_num_iterations),
                ctypes.byref(self._handle)))
            print(2)
            out_num_class = ctypes.c_int(0)
            _safe_call(_LIB.LGBM_BoosterGetNumClasses(
                self._handle,
                ctypes.byref(out_num_class)))
            print(3)
            self.__num_class = out_num_class.value
            print(4)
            self.pandas_categorical = _load_pandas_categorical(file_name=model_file)
            print(5)
            if params:
                _log_warning('Ignoring params argument, using parameters from model file.')
            params = self._get_loaded_param()
            print(6)

from lightgbm.

myron0330 avatar myron0330 commented on August 23, 2024

ok, I find the problem. It's because of my numpy, scipy, pandas version is not compatible to the model file.

should make sure that these compute libs are compatible to the model files.

from lightgbm.

jameslamb avatar jameslamb commented on August 23, 2024

ok, I find the problem. It's because of my numpy, scipy, pandas version is not compatible to the model file.

Can you please provide specific details about this? I don't understand this statement.

You may want to see "How to create a reproducible example" (link) for some advice on reporting software problems in a way that others can help confirm and investigate them.

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.