-
Notifications
You must be signed in to change notification settings - Fork 16
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
Consider renaming fix_variables function to roof_duality #6
Comments
I'm good with |
Given that it's a method of roof_duality module, is it worth considering a name that is clearer to users with less familiarity with roof duality? Perhaps something like |
For the uninitiated, it's much more useful to have a function name that tells them what the function is doing, and not how. I dare you all, try googling "roof duality" and quickly figuring out what a function in Ocean called |
I'm wondering if |
Well, based on its location, I know it's a preprocessing algorithm for BQMs. There is also a docstring. And there are MANY ways to fix or reduce variables. And likely that we'll want to add some of them in the relatively near future. I would rather err on the side of explicit.
|
@arcondello, why would the func name need to specify that it's method is roof duality when method is imported from the roof duality module? You can have many |
Exactly. Like |
We could move the function into a more informative namespace?
|
jinx. |
I prefer
because it is most easily extensible. So
or something like that? |
My opinion Reduction is too common of a term, reduce_variables is okay though. I prefer the remaining two. |
If we merge this question with #2, then maybe it makes sense to move it into the
make the |
Now, does the composite also live there?
This is the kind of place that dwavesystems/dwave-ocean-sdk#21 would really pay off. Or a mono package 😄 . |
I agree we should shift focus to lower_bounds, for the function. But the composite is really about partially fixing variables, not finding lower bound, right? So, it probably warrants a clearer name. That's even more so if we stick it in the |
Thinking a bit out of the box, what about
or something like that? We could probably migrate the Alternative:
|
I am using a string above because we don't have a stable API for these functions yet. It's not obvious to me that future ones would return |
Fixing variables is a natural fit to composite pattern, but looking on this as a black box ("I just want this thing to fix my variables"), I like this the most:
The one with fixed fixed variables:
|
I regret that we named the composite Should we leave it in dimod or move it here? If the latter, there are a bunch of other ones we could consider moving. SRTs, ConnectedComponents, etc. |
I vote we move preprocessing stuff here. I can't see a particularly strong reason to keep it in dimod. |
Do we classify SRT as pre-processing? |
@randomir I agree, especially in the long run. As a practical matter, some may be easier to move than others. Especially on a short timeline. @JoelPasvolsky IMO it's no less a preprocessing algorithm than roof duality. Both have a "postprocessing" component. Last chance to rename this package |
Btw, with this switching composite behavior (on |
Am also good with moving RoofDualityComposite into FixVariablesComposite. To recap on naming and modules here, is everyone good with:
|
From our discussion above, |
@JoelPasvolsky, I am not sure that I agree. We want non-experts to find the composite, which is pretty explicit. The function (for the users who want to use it to fix variables) is an implementation detail of the composite. For the users who are interested in the lower bound, the function is in the appropriate namespace. Of course both should be documented appropriately and given context. But this still seems like a massive step up from the current situation. Especially given how few users have found/used the existing function with the |
Resolved with #7 |
Since we're releasing a new package, perhaps we should consider using a more explicit name. The deprecated dimod function can still be called
fix_variables
.The text was updated successfully, but these errors were encountered: