-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add parameter "progress file" #1038
Add parameter "progress file" #1038
Conversation
Add "progress_file" into parameters.
Fix wrong format.
…into add_progress_file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR. Could you please provide small examples (with population=20, generations=10) of this log file when verbosity=1, 2, 3?
@@ -232,7 +233,8 @@ def __init__(self, generations=100, population_size=100, offspring_size=None, | |||
A setting of 2 or higher will add a progress bar during the optimization procedure. | |||
disable_update_check: bool, optional (default: False) | |||
Flag indicating whether the TPOT version checker should be disabled. | |||
|
|||
progress_file: io.TextIOWrapper or io.StringIO, optional (defaul: sys.stdout) | |||
Save progress content to a file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please rename the progress_file
to log_file
? I think there are some log infos when verbosity=3
.
Of course I can. I am wondering that I should write an example and take screenshots or write an unit test. How do you think? |
unit tests are preferred. |
Hi,
I am not sure the reason so I just commented out the last unit test. And it also happens in master branch. @weixuanfu Could you please help to answer this? If it's an issue, I can try to figure out it. |
Hi, I found the reason why it raise exception only in case of verbosity as 3.
I think it can be modified as printing warning simply instead of raising error. I can put my unit test 3 back as well. Any suggestion is welcome. :) |
Thank you for looking into it. The issue is that there is no xgboost in the test environment. We intentionally let tpot raise that import error when verbosity=3. I think in the CI envs of TPOT unit tests (Linux and Windows), xgboost should be installed so that this error should not be raised. Could you please build a similar conda env with xgboost for testing unit test with verbosity=3? |
Ok. I tried it and passed all tests. Please take a look. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for updating. I just found a few minor farther changes. I will merge it to dev branch first for next version of TPOT once those changes are made.
Hi, |
I have resolved it. Thank you! |
Thank you for the PR. I will merge it to dev branch. |
Thanks for your help, @weixuanfu. :) |
[please review the Contribution Guidelines prior to submitting your pull request. go ahead and delete this line if you've already reviewed said guidelines.]
What does this PR do?
Add a new parameter to output tqdm progress to a file.
Where should the reviewer start?
tpot/base.py
How should this PR be tested?
Any background context you want to provide?
What are the relevant issues?
[you can link directly to issues by entering # then the number of the issue, for example, #3 links to issue 3]
Screenshots (if appropriate)
Questions:
api.md is already updated.
Nope.