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

Explicit __init__ methods for Transformer classes #220

Open
tyarkoni opened this issue Dec 29, 2017 · 2 comments
Open

Explicit __init__ methods for Transformer classes #220

tyarkoni opened this issue Dec 29, 2017 · 2 comments

Comments

@tyarkoni
Copy link
Collaborator

A minor issue with the current Transformer hierarchy is that most of the user-facing classes don't have to define explicit __init__ methods. This isn't a problem functionally, but it makes it hard for users to figure out what the initialization arguments are--and this can be quite important (e.g., in the case of arguments like api_key). Even though it's redundant, we should probably insist on every public-facing Transformer class explicitly implementing __init__ with all the main arguments visible, even if all the method does is turn right around and pass everything up to the superclass.

@qmac
Copy link
Collaborator

qmac commented Jan 4, 2018

I agree with this issue as well, it just will be tedious to do everything. This also leaves us open to interpreting what "main arguments" are, but I suspect we'll just have to use our judgment per transformer. Do the LibrosaFeatureExtractors look good for this pattern?

@tyarkoni
Copy link
Collaborator Author

tyarkoni commented Jan 4, 2018

Yeah I think we probably need to do the librosa Extractors this way too. But there's no rush on this--it's not a high priority, and we can chip away at it as time allows. It was mainly salient to me because I'm close to pushing a big PR that adds Sphinx docs, and the autodocs don't help very much when the args are basically just **kwargs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants