[ci] prevent lgb.model and lgb.pkl files being left behind after testing#6518
Conversation
262bfa8 to
bed0201
Compare
jameslamb
left a comment
There was a problem hiding this comment.
Thanks so much for working on this! Please see my first round of suggestions.
| lgb_train = lgb.Dataset(X, y, free_raw_data=False) | ||
| bst = lgb.train(params=params, train_set=lgb_train, num_boost_round=num_train_rounds) | ||
| preds_raw = bst.predict(X, raw_score=True) | ||
| model_path_txt = str(tmp_path / "lgb.model") |
There was a problem hiding this comment.
Since this was already using tmp_path, I think it's very unlikely that this one was leaving a file behind. Could you please revert the changes to this case and any others that were already using tmp_path?
tmp_path to prevent lgb.model and lgb.pkl files being left behind after testingtmp_path to prevent lgb.model and lgb.pkl files being left behind after testing
tmp_path to prevent lgb.model and lgb.pkl files being left behind after testinglgb.model and lgb.pkl files being left behind after testing
This reverts commit bed0201.
jameslamb
left a comment
There was a problem hiding this comment.
Thanks very much! I pulled this branch and ran the tests, confirmed that there now lgb.model and lgb.pkl aren't left behind.
|
This pull request has been automatically locked since there has not been any recent activity since it was closed. |
contributes to: #6361
Specificially prevents
lgb.pklandlgb.modelfiles from being left behind after running tests by using pytest'stmp_pathfixture. One can use the reprex described in #6361 (comment) to confirm these files are no longer left behind after these changes.