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

optimizer param struct improvements #425

Merged

Conversation

suntzu86
Copy link
Contributor

********* PEOPLE *************
Primary reviewer: @sc932

Reviewers:

********* DESCRIPTION **************
Branch Name: eliu_gh_138_expose_cpp_struct_data_members_to_python
Ticket(s)/Issue(s): Closes #138 Closes #391

meat of change in:
moe/optimal_learning/cpp/gpp_optimizer_parameters.hpp
moe/optimal_learning/cpp/gpp_python_common.cpp
moe/optimal_learning/python/comparison.py
moe/optimal_learning/python/cpp_wrappers/optimization.py
moe/tests/optimal_learning/python/comparison_test.py
moe/tests/optimal_learning/python/cpp_wrappers/optimization_test.py

C++ optimizer param structs now direclty readable/writeable from Python
C++ GradientDescentParameters now tracks num_steps_averaged (but doesnt use it)

********* TESTING DONE *************
make test
manual checking

C++ GradientDescentParameters now tracks num_steps_averaged (but doesnt use it)

@classmethod
@pytest.fixture(autouse=True, scope='class')
def base_setup(cls):
Copy link
Contributor

Choose a reason for hiding this comment

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

cls or self?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cls, see @classmethod decorator. this is so that these objects are created once per test class, equivalent of class_setup in testify

Copy link
Contributor

Choose a reason for hiding this comment

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

@sc932
Copy link
Contributor

sc932 commented Dec 1, 2014

Looks good, some quick questions in the tests, I'm happy to 🐑 though.

suntzu86 added a commit that referenced this pull request Dec 1, 2014
…members_to_python

optimizer param struct improvements
@suntzu86 suntzu86 merged commit 83141c7 into master Dec 1, 2014
@suntzu86 suntzu86 deleted the eliu_gh_138_expose_cpp_struct_data_members_to_python branch December 1, 2014 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants