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

Add docstrings to optuna.termintor #4674

Closed

Conversation

Alnusjaponica
Copy link
Collaborator

@Alnusjaponica Alnusjaponica commented May 12, 2023

Motivation

Resolve #4598

Description of the changes

  • Add docstrings to
    • TerminatorCallback (optuna/terminator/callback.py)
    • CrossValidationErrorEvaluator (optuna/terminator/erroreval.py)
    • report_cross_validation_scores (optuna/terminator/erroreval.py)
    • StaticErrorEvaluator (optuna/terminator/erroreval.py)
  • Fix docstring of Terminator (optuna/terminator/terminator.py)
  • Add .rst files for terminator documentation

@Alnusjaponica
Copy link
Collaborator Author

Alnusjaponica commented May 13, 2023

There are two points to discuss regarding this PR:

  • To avoid errors in doctest, the output destination of the print statement in the Terminator docstring is set to standard error. However, I don't think this is a good approach. What should be done instead?
  • Is the current module hierarchy and the correspondence with the .rst files correct?
    I am going to update this PR or submit another follow-up PR according to how Add import for public API of optuna.terminator to optuna/terminator/__init__.py #4669 progresses.

@codecov-commenter
Copy link

Codecov Report

Merging #4674 (829e4b3) into master (466cddf) will decrease coverage by 0.01%.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #4674      +/-   ##
==========================================
- Coverage   90.62%   90.61%   -0.01%     
==========================================
  Files         187      186       -1     
  Lines       14297    14292       -5     
==========================================
- Hits        12956    12951       -5     
  Misses       1341     1341              
Impacted Files Coverage Δ
optuna/terminator/callback.py 100.00% <ø> (ø)
optuna/terminator/erroreval.py 97.67% <ø> (ø)
optuna/terminator/terminator.py 96.66% <ø> (ø)

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Alnusjaponica Alnusjaponica deleted the followup-termintor-docstring branch May 14, 2023 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add docstrings for Optuna Terminator APIs
4 participants