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

Fixed missing feature names for XGBoost #93

Merged
merged 5 commits into from
Jul 30, 2019
Merged

Fixed missing feature names for XGBoost #93

merged 5 commits into from
Jul 30, 2019

Conversation

akhvorov
Copy link
Contributor

Now it's not fail if XGBoost model were saved by save without feature names

@coveralls
Copy link

coveralls commented Jul 17, 2019

Coverage Status

Coverage increased (+0.005%) to 95.15% when pulling 1d1c824 on akhvorov:master into d788566 on BayesWitnesses:master.

@izeigerman
Copy link
Member

Hey @akhvorov, thank you so much for your PR! The fix is really great 👍 May I please ask you to add a unit test to make sure that the issue is gone? Otherwise I can add one myself in the follow-up PR.

utils.train_model_regression(estimator)

filename = "tmp.file"
if os.path.exists(filename):
Copy link
Member

@izeigerman izeigerman Jul 29, 2019

Choose a reason for hiding this comment

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

Thanks for adding the test!
May I please ask you to use tmp_dir utility function to avoid polluting user's workspace. Example can be found here:

with utils.tmp_dir() as tmp_dirpath:

Note that this context manager will clean up the temporary directory automatically so you don't have to do it manually here.
I'd also suggest to use UUID for a filename in place of hardcoded tmp.file to avoid potential conflicts, since this particular test should not be affected by artifacts which can potentially be produced by other tests.

Great job otherwise 👍

UPD: You can actually use any filename, since the entire tmp directory will be removed once this test is finished.

Copy link
Member

@izeigerman izeigerman left a comment

Choose a reason for hiding this comment

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

LGTM 👍 thanks for making the changes!

@krinart
Copy link
Member

krinart commented Jul 30, 2019

Thanks for the contribution 👍

@krinart krinart merged commit 41ab5dc into BayesWitnesses:master Jul 30, 2019
@akhvorov
Copy link
Contributor Author

Thank you for advices and help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants