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

Simplify INI-style config reader using C++11 STL #4478

Merged
merged 18 commits into from
May 30, 2019

Conversation

fuhaoda
Copy link
Contributor

@fuhaoda fuhaoda commented May 20, 2019

Use C++11 STL to simplify the "./src/common/config.h" file.

@trivialfis
Copy link
Member

@fuhaoda Hi, any update on this? And could you please add some simple tests?

@fuhaoda
Copy link
Contributor Author

fuhaoda commented May 25, 2019

@fuhaoda Hi, any update on this? And could you please add some simple tests?

Is it only a format issue? I don't know what's wrong here. It can be compiled and pass test on my Mac, and I compared the results and test case. All are the same before I submit the pull request.

@trivialfis
Copy link
Member

@fuhaoda It has some linter issues on Linux, and somehow failed tests on Windows. Would you like to fix the linter first so that we can see how's it doing on Linux? See: https://xgboost-ci.net/blue/organizations/jenkins/xgboost/detail/PR-4478/1/pipeline

and look for some lines like this:

[2019-05-20T02:50:11.138Z] src/cli_main.cc:345: Missing spaces around = [whitespace/operators] [4]
[2019-05-20T02:50:11.138Z] src/common/config.h:17: Do not indent within a namespace [runtime/indentation_namespace] [4]
[2019-05-20T02:50:11.138Z] src/common/config.h:21: Do not indent within a namespace [runtime/indentation_namespace] [4]

@fuhaoda
Copy link
Contributor Author

fuhaoda commented May 27, 2019

@trivialfis Thank you so much! Trying really hard and fixed the linter issues. Could you please take a look on what's the issue on Windows test? My guess is the path issue to include character like .

@hcho3
Copy link
Collaborator

hcho3 commented May 27, 2019

@fuhaoda You were using older versions of the submodules dmlc-core and rabit.

@trivialfis trivialfis self-requested a review May 27, 2019 22:30
src/common/config.h Outdated Show resolved Hide resolved
@hcho3 hcho3 changed the title simplify the config.h file Simplify INI-style config reader using C++11 STL May 28, 2019
Co-Authored-By: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
@fuhaoda
Copy link
Contributor Author

fuhaoda commented May 29, 2019

@hcho3 any thoughts on the check failures? it was successful yesterday...

@hcho3
Copy link
Collaborator

hcho3 commented May 29, 2019

@fuhaoda Looks like it's out of memory. Let me re-start the test again. Fundamentally, the tests tend to consume a lot of memory, so we often get out-of-memory errors. I'm trying to find ways to reduce memory consumption in tests.

Copy link
Member

@trivialfis trivialfis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me do some local changes before committing.

std::istream &fin_;
};
std::ifstream fi_;
std::string allowableChar =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why clang-tidy didn't catch this styling error.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trivialfis I don't see any issue with this line?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hcho3 private member suffix '_'. I tried clang-tidy-8 and it didn't catch it either.

@@ -1,8 +1,8 @@
/*!
* Copyright 2014 by Contributors
* Copyright 2019 by Contributors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2014-2019

@trivialfis
Copy link
Member

@fuhaoda Sorry for the late reply. I can't push to your branch, so could you apply the following patch and I will merge?
0001-Fix-header-and-format.zip

@fuhaoda
Copy link
Contributor Author

fuhaoda commented May 30, 2019

@trivialfis Thanks a lot. Just followed your suggestion and changed them all on the format issues based on the patch that you sent to me. @hcho3 Thanks for the suggestions as well!

@fuhaoda
Copy link
Contributor Author

fuhaoda commented May 30, 2019

@hcho3 is it an out of memory issue again? could you please re-start the test again? looking forward to the final merge.

@hcho3
Copy link
Collaborator

hcho3 commented May 30, 2019

@fuhaoda No, this time it was compilation failure, because the cub submodule was pointing at wrong commit. I fixed the problem

@fuhaoda
Copy link
Contributor Author

fuhaoda commented May 30, 2019

@hcho3 likely to need your help again : ) failed in a different test

@codecov-io
Copy link

codecov-io commented May 30, 2019

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4478   +/-   ##
=======================================
  Coverage   79.42%   79.42%           
=======================================
  Files          10       10           
  Lines        1735     1735           
=======================================
  Hits         1378     1378           
  Misses        357      357
Impacted Files Coverage Δ
python-package/xgboost/dask.py 28.78% <0%> (ø) ⬆️

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 3f7e5d9...484d0fe. Read the comment docs.

@trivialfis
Copy link
Member

@hcho3 I will leave it for you to merge it. Thanks for all the helps here.

@hcho3 hcho3 merged commit dd60fc2 into dmlc:master May 30, 2019
@hcho3
Copy link
Collaborator

hcho3 commented May 30, 2019

@trivialfis I'm still looking for ways to eliminate out-of-memory errors that pop up once in a while.

sriramch added a commit to sriramch/xgboost that referenced this pull request May 30, 2019
sriramch added a commit to sriramch/xgboost that referenced this pull request May 30, 2019
   - This reverts commit dd60fc2.
- create a row state per device that keeps track of spans of the sparse pages
  that needs to be processed
@fuhaoda fuhaoda deleted the HaodaDev0.82 branch May 31, 2019 01:38
@hcho3 hcho3 mentioned this pull request May 31, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 29, 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.

4 participants