-
Notifications
You must be signed in to change notification settings - Fork 38
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
added first pass at python features #43
Conversation
* as desired in: BlueBrain#27 * currently only for Python * Documentation will come as we settle on an API
def test_registerFeature(self): | ||
import efel.cppcore | ||
|
||
def getTwiceAP_Amp(output): |
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 is how to use it
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 that ideally the feature should use setFeature to store it's own values
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.
That's mainly used as an internal cache, correct?
I could keep that local to cppcore.cpp, if that makes sense. What is the invalidation policy for the cache at the moment (so I can mirror it)?
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.
Not 100% sure, but I think that cppcore.Initialize resets the cache ?
Current coverage is
|
return len(feature_values) | ||
|
||
self.setup_data() | ||
efel.cppcore.registerFeature('getTwiceAP_Amp', getTwiceAP_Amp) |
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.
We would also need some mechanism to let different versions of the same feature live next to each other. Maybe we can add a version_string argument ?
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.
What about just using the name of the feature do it: 'AP_amplitude_v1', 'AP_amplitude_v2', etc. That way, the calling convention doesn't have to change. Otherwise, getFeature has to take a version as well.
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.
Mmm, that won't be general enough. The idea is that the user should be able to replace e.g. AP_amplitude with it's own version, 'and' that then every feature that depends on AP_amplitude will pick up the new implementation automatically.
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.
Ah, ok.
Then, the idea would be that features can still depend on the old version if that's what their dependency says? That means we have to version all features, including the ones that already exist, right?
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, but that's why we have the dependency file and the liibv* versions
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.
So, AP_amplitude wouldn't be overwritten for those, just for future ones?
I will closing this until we have time to look at this again (have put an 'archived' label) |
Adjust amplitude use in_target for HyperDepol
Support eFeatures written in Python #27