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

Fix Rank Demo Not Working #2694

Closed
wants to merge 2 commits into from
Closed

Fix Rank Demo Not Working #2694

wants to merge 2 commits into from

Conversation

Yunni
Copy link
Contributor

@Yunni Yunni commented Sep 10, 2017

Currently, the rank demo is broken. There are 2 issues with it:

  • The link to download the dataset is outdated. The dataset has been moved to OneDrive. Since the data size is pretty small, I am adding the datesets directly into the repo.
  • The demo script has a segment fault. The root cause is that learner -> gbm_ is loaded after learner get configured. As a result, learner -> gbm_ -> predictor is not initialized.

Also, it seems the tests for ranking is not covered very well. I'll probably create a follow-up PR to add more unit tests for ranking.

@codecov-io
Copy link

codecov-io commented Sep 10, 2017

Codecov Report

Merging #2694 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2694   +/-   ##
=========================================
  Coverage     42.84%   42.84%           
  Complexity      185      185           
=========================================
  Files           150      150           
  Lines         11306    11306           
  Branches       1139     1139           
=========================================
  Hits           4844     4844           
  Misses         6137     6137           
  Partials        325      325

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e6a9063...7585a40. Read the comment docs.

@qiugen
Copy link

qiugen commented Sep 11, 2017

hi yunni. I checkout the version you fixed("The root cause is that learner -> gbm_ is loaded after learner get configured. "). while I run the bash "sh runexp.sh", program goes core dump.
runexp.sh: ? 9: 12226 ??? (??)../../xgboost mq2008.conf task=pred model_in=0004.model

@Yunni
Copy link
Contributor Author

Yunni commented Sep 11, 2017

Interesting. It runs totally fine on my computer.
@qiugen Did you run make clean and make -j4? What's your running environment and would you mind using gdb to provide some more log?

@qiugen
Copy link

qiugen commented Sep 11, 2017

I am unfamiliar with cmake, then spent hours to find a way modify CMakelist.txt for debug info, Finally I give up, by adding '-g' in Makefile directly. I get backtrace infos as fallow:
#0 0x000000000045b4b3 in xgboost::gbm::GBTree::PredictBatch (this=0x848690, p_fmat=0x8474c0, out_preds=0x7fff0beed340, ntree_limit=0) at src/gbm/gbtree.cc:217
#1 0x000000000043425d in xgboost::LearnerImpl::PredictRaw (this=0x83f1b0, data=0x8474c0, out_preds=0x7fff0beed340, ntree_limit=0) at src/learner.cc:530
#2 0x000000000043360a in xgboost::LearnerImpl::Predict (this=0x83f1b0, data=0x8474c0, output_margin=false, out_preds=0x7fff0beed340, ntree_limit=0, pred_leaf=false, pred_contribs=false) at src/learner.cc:434
#3 0x0000000000416c12 in xgboost::CLIPredict (param=...) at src/cli_main.cc:328
#4 0x00000000004172aa in xgboost::CLIRunTask (argc=4, argv=0x7fff0beedfa8) at src/cli_main.cc:369
#5 0x0000000000417405 in main (argc=4, argv=0x7fff0beedfa8) at src/cli_main.cc:377

@Yunni
Copy link
Contributor Author

Yunni commented Sep 11, 2017

Interesting. I got the same error when I ran it for the first time but it's fixed on both my Ubuntu and Mac after applying this PR. @qiugen Would you help me on 2 things?
(1) Would you mind providing your OS and g++ version?
(2) Can you check if the issue still exists if you swap back the 2 lines in src/cli_main.cc?

@qiugen
Copy link

qiugen commented Sep 12, 2017

(1) OS info
LSB Version: :core-3.0-amd64:core-3.0-ia32:core-3.0-noarch:graphics-3.0-amd64:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: CentOS
Description: CentOS release 4.3 (Final)
Release: 4.3
Codename: Final
gcc version: g++ (GCC) 4.8.2
(2) after swap them back, make clean && make recompile xgboost, run sh runexp.sh the question seems to be sloved. the output pred.txt has 2874 lines in float value.

@Yunni Yunni closed this Dec 27, 2017
@Yunni Yunni deleted the yunn_test branch December 28, 2017 19:50
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants