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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions demo/rank/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ For more usage details please refer to the [binary classification demo](../binar

Instructions
====
The dataset for ranking demo is from LETOR04 MQ2008 fold1,
The dataset for ranking demo is from [LETOR04 MQ2008 fold1](https://www.microsoft.com/en-us/research/project/letor-learning-rank-information-retrieval/),
You can use the following command to run the example

Get the data: ./wgetdata.sh
Run the example: ./runexp.sh
```
./runexp.sh
```
2,874 changes: 2,874 additions & 0 deletions demo/rank/test.txt

Large diffs are not rendered by default.

9,630 changes: 9,630 additions & 0 deletions demo/rank/train.txt

Large diffs are not rendered by default.

2,707 changes: 2,707 additions & 0 deletions demo/rank/vali.txt

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions demo/rank/wgetdata.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/cli_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ void CLIPredict(const CLIParam& param) {
std::unique_ptr<Learner> learner(Learner::Create({}));
std::unique_ptr<dmlc::Stream> fi(
dmlc::Stream::Create(param.model_in.c_str(), "r"));
learner->Configure(param.cfg);
learner->Load(fi.get());
learner->Configure(param.cfg);

if (param.silent == 0) {
LOG(CONSOLE) << "start prediction...";
Expand Down