-
Notifications
You must be signed in to change notification settings - Fork 34
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 tests for c-TPE #208
Merged
Merged
Add tests for c-TPE #208
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@c-bata Could you review this PR? |
c-bata
approved these changes
Dec 17, 2024
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.
I confirmed that all tests are green. Thank you for your pull request.
$ pytest package/samplers/ctpe/tests/
================================================================================================================================================ test session starts =================================================================================================================================================
platform linux -- Python 3.11.7, pytest-8.3.3, pluggy-1.5.0
rootdir: /home/cbata/go/src/github.com/optuna/optunahub-registry
configfile: pyproject.toml
collected 208 items
package/samplers/ctpe/tests/test_sampler.py ................................................................................................................................................................................................................ [100%]
================================================================================================================================================== warnings summary ==================================================================================================================================================
package/samplers/ctpe/tests/test_sampler.py:772
/home/cbata/go/src/github.com/optuna/optunahub-registry/package/samplers/ctpe/tests/test_sampler.py:772: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.slow
package/samplers/ctpe/tests/test_sampler.py:800
/home/cbata/go/src/github.com/optuna/optunahub-registry/package/samplers/ctpe/tests/test_sampler.py:800: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.slow
package/samplers/ctpe/tests/test_sampler.py:868
/home/cbata/go/src/github.com/optuna/optunahub-registry/package/samplers/ctpe/tests/test_sampler.py:868: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.slow
package/samplers/ctpe/tests/test_sampler.py: 107 warnings
/home/cbata/go/src/github.com/optuna/optunahub-registry/venv/lib/python3.11/site-packages/optuna/_experimental.py:31: ExperimentalWarning: Argument ``constraints_func`` is an experimental feature. The interface can change in the future.
warnings.warn(
package/samplers/ctpe/tests/test_sampler.py: 87 warnings
/home/cbata/go/src/github.com/optuna/optunahub-registry/venv/lib/python3.11/site-packages/optuna/_experimental.py:31: ExperimentalWarning: Argument ``multivariate`` is an experimental feature. The interface can change in the future.
warnings.warn(
package/samplers/ctpe/tests/test_sampler.py::test_dynamic_range_objective[20-30-<lambda>0]
/home/cbata/go/src/github.com/optuna/optunahub-registry/package/samplers/ctpe/sampler.py:188: RuntimeWarning: invalid value encountered in subtract
log_second_term = np.log(1.0 - _q + _EPS) + lls_above - lls_below
package/samplers/ctpe/tests/test_sampler.py::test_dynamic_range_objective[20-30-<lambda>0]
/home/cbata/go/src/github.com/optuna/optunahub-registry/package/samplers/ctpe/sampler.py:189: RuntimeWarning: invalid value encountered in logaddexp
acq_func_vals = np.sum(-np.logaddexp(log_first_term, log_second_term), axis=0)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================================================================================= 208 passed, 199 warnings in 19.00s =========================================================================================================================================
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds unittests for c-TPE.