diff --git a/build-python.sh b/build-python.sh index 8892ca2e936f..4eefcbeaf6c7 100755 --- a/build-python.sh +++ b/build-python.sh @@ -186,7 +186,7 @@ while [ $# -gt 0 ]; do shift done -pip install --prefer-binary 'build>=0.10.0' +venv/bin/pip install --prefer-binary 'build>=0.10.0' # create a new directory that just contains the files needed # to build the Python package @@ -362,12 +362,12 @@ if test "${INSTALL}" = true; then echo "--- installing lightgbm ---" # ref for use of '--find-links': https://stackoverflow.com/a/52481267/3986677 cd ../dist - pip install \ + ../venv/bin/pip install \ ${PIP_INSTALL_ARGS} \ --force-reinstall \ --no-cache-dir \ --find-links=. \ - lightgbm + lightgbm-*.whl cd ../ fi diff --git a/python-package/lightgbm/basic.py b/python-package/lightgbm/basic.py index 3dfa583a62bb..752570aaba48 100644 --- a/python-package/lightgbm/basic.py +++ b/python-package/lightgbm/basic.py @@ -3661,6 +3661,7 @@ def update( is_the_same_train_set = False else: is_the_same_train_set = train_set is self.train_set and self.train_set_version == train_set.version + print("t1") if train_set is not None and not is_the_same_train_set: if not isinstance(train_set, Dataset): raise TypeError(f'Training data should be Dataset instance, met {type(train_set).__name__}') @@ -3673,6 +3674,7 @@ def update( self.train_set.construct()._handle)) self.__inner_predict_buffer[0] = None self.train_set_version = self.train_set.version + print("t2") is_finished = ctypes.c_int(0) if fobj is None: if self.__set_objective_to_none: @@ -3682,10 +3684,12 @@ def update( ctypes.byref(is_finished))) self.__is_predicted_cur_iter = [False for _ in range(self.__num_dataset)] return is_finished.value == 1 + print("t3") else: if not self.__set_objective_to_none: self.reset_parameter({"objective": "none"}).__set_objective_to_none = True grad, hess = fobj(self.__inner_predict(0), self.train_set) + print("t4") return self.__boost(grad, hess) def __boost( diff --git a/python-package/lightgbm/engine.py b/python-package/lightgbm/engine.py index 822aa3b35017..31241f2fb4b2 100644 --- a/python-package/lightgbm/engine.py +++ b/python-package/lightgbm/engine.py @@ -264,6 +264,7 @@ def train( booster.best_iteration = 0 # start training + print("t0") for i in range(init_iteration, init_iteration + num_boost_round): for cb in callbacks_before_iter: cb(callback.CallbackEnv(model=booster, diff --git a/src/boosting/gbdt_model_text.cpp b/src/boosting/gbdt_model_text.cpp index 73c3ea98d3f6..b6cb40d876f5 100644 --- a/src/boosting/gbdt_model_text.cpp +++ b/src/boosting/gbdt_model_text.cpp @@ -23,6 +23,7 @@ std::string GBDT::DumpModel(int start_iteration, int num_iteration, int feature_ Common::C_stringstream(str_buf); str_buf << "{"; + str_buf << "\"TESTING\":\"" << "HAHA_v2" << "\"," << '\n'; str_buf << "\"name\":\"" << SubModelName() << "\"," << '\n'; str_buf << "\"version\":\"" << kModelVersion << "\"," << '\n'; str_buf << "\"num_class\":" << num_class_ << "," << '\n';