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
Make SG_ADD register parameters into the new parameter map #4048
Conversation
@@ -88,12 +88,14 @@ class GradientModelSelectionCostFunction: public FirstOrderCostFunction | |||
SG_ADD((CSGObject **)&m_obj, "GradientModelSelectionCostFunction__m_obj", | |||
"obj in GradientModelSelectionCostFunction", MS_NOT_AVAILABLE); | |||
m_func_data = NULL; | |||
/* |
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.
@karlnapf need your comments here. They were registered by value which is not good.
@@ -216,6 +216,13 @@ template <class T> class SGSparseVector : public SGReferencedData | |||
|
|||
}; | |||
|
|||
template <class T> |
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.
Anything that goes into Any should have operator==, that's why I added it here
c15b034
to
c29d8e5
Compare
Apparently this slows down the compilation as running tests on travis times out most of the times. |
Codecov Report
@@ Coverage Diff @@
## develop #4048 +/- ##
==========================================
Coverage ? 56.55%
==========================================
Files ? 1329
Lines ? 92734
Branches ? 0
==========================================
Hits ? 52444
Misses ? 40290
Partials ? 0
Continue to review full report at Codecov.
|
@lisitsyn the reason for the compilation slowdown is because you've changed a .h that basically being used everywhere hence the ccache-ed objects cannot be used... hence travis needs to compile everything from scratch... see in case of appveyor the compilation time is always 40+ mins ;) |
ho ho ho |
#define SG_ADD4(param, name, description, ms_available) \ | ||
{ \ | ||
m_parameters->add(param, name, description); \ | ||
watch_param(name, param); \ |
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.
this reminds me. We currently have two maps: one for registering all paramters, one for modelselection available only.
I suggest we don't keep this design with tags, but rather have one and somehow mark them otherwise ?
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 think the parameter we store should be 'rich'. This means it is not just 'Any' but 'Any' + extras. Such as this model_selection_enabled.
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.
Yep I agree. I think this is a place to include the domain bounds, information about gradients, sampling callbacks (?), priors, etc
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.
🎄
No description provided.