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

disable monotone constraint in objective functions with renew_tree_output #3380

Merged
merged 3 commits into from
Sep 30, 2020

Conversation

guolinke
Copy link
Collaborator

to fix #3371

@guolinke guolinke changed the title Update gbdt.cpp disable monotone constraint in objective functions with renew_tree_output Sep 11, 2020
src/boosting/gbdt.cpp Outdated Show resolved Hide resolved
src/boosting/gbdt.cpp Outdated Show resolved Hide resolved
src/boosting/gbdt.cpp Outdated Show resolved Hide resolved
@StrikerRUS
Copy link
Collaborator

StrikerRUS commented Sep 12, 2020

Hmm, I have never seen this error before in non-MinGW builds:

================================== FAILURES ===================================
__________________ TestBasic.test_plot_split_value_histogram __________________

self = <test_plotting.TestBasic testMethod=test_plot_split_value_histogram>

    @unittest.skipIf(not MATPLOTLIB_INSTALLED, 'matplotlib is not installed')
    def test_plot_split_value_histogram(self):
>       gbm0 = lgb.train(self.params, self.train_data, num_boost_round=10)

..\tests\python_package_test\test_plotting.py:64: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\Miniconda\envs\test-env\lib\site-packages\lightgbm\engine.py:231: in train
    booster = Booster(params=params, train_set=train_set)
C:\Miniconda\envs\test-env\lib\site-packages\lightgbm\basic.py:2010: in __init__
    self.__get_eval_info()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lightgbm.basic.Booster object at 0x000000000A248B88>

    def __get_eval_info(self):
        """Get inner evaluation count and names."""
        if self.__need_reload_eval_info:
            self.__need_reload_eval_info = False
            out_num_eval = ctypes.c_int(0)
            # Get num of inner evals
            _safe_call(_LIB.LGBM_BoosterGetEvalCounts(
                self.handle,
                ctypes.byref(out_num_eval)))
            self.__num_inner_eval = out_num_eval.value
            if self.__num_inner_eval > 0:
                # Get name of evals
                tmp_out_len = ctypes.c_int(0)
                reserved_string_buffer_size = 255
                required_string_buffer_size = ctypes.c_size_t(0)
                string_buffers = [
                    ctypes.create_string_buffer(reserved_string_buffer_size) for i in range_(self.__num_inner_eval)
                ]
                ptr_string_buffers = (ctypes.c_char_p * self.__num_inner_eval)(*map(ctypes.addressof, string_buffers))
                _safe_call(_LIB.LGBM_BoosterGetEvalNames(
                    self.handle,
                    self.__num_inner_eval,
                    ctypes.byref(tmp_out_len),
                    reserved_string_buffer_size,
                    ctypes.byref(required_string_buffer_size),
>                   ptr_string_buffers))
E               WindowsError: exception: access violation writing 0x00007FF9085F04DE

C:\Miniconda\envs\test-env\lib\site-packages\lightgbm\basic.py:3182: WindowsError

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Monotone constraint with Quantile distribution does not work correctly
3 participants