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

defining pipelines #8

Closed
Jayant1234 opened this issue Apr 19, 2019 · 6 comments
Closed

defining pipelines #8

Jayant1234 opened this issue Apr 19, 2019 · 6 comments

Comments

@Jayant1234
Copy link
Contributor

I think it will be quite tedious to include many transformations and estimators for each model. So, we should find a way to define them at one class and we can use subsets of these transformations and estimators for each specific implementation like linear regression.

@aashishyadavally
Copy link
Contributor

I feel even that would be a very redundant thing to do. Say, there are 3 transformations and 5 estimators, imagine having 15 combinations defined in the class that you are referring to. And, this is just the tip of the iceberg.

Rather, defining the default parameters, and overriding them with user arguments is a more decent way to go ahead.

@Jayant1234
Copy link
Contributor Author

No we just need to define them in pipeline, not build the pipeline with them. In that case we won't need to make permutations and combinations at all. We just need to list them for better reusuability.

@Jayant1234
Copy link
Contributor Author

But that can't be done in abstract class.

@aashishyadavally
Copy link
Contributor

aashishyadavally commented Apr 19, 2019

I am still trying to wrap my head around this.
This shouldn't be affecting your Model class in any way.
We have used @abstractmethod to only ensure that all the child classes MUST have those methods defined.
Like, flow or pipeline will definetely be needed when we are sub-classing this model in the final script that will bind all of this together.
The contents of it can be meddled with there, based on the user's choice.
Which is why, it's better to just create functions here with default values, which will be overridden by users, if need be.
I am not sure as to why defining the Model class as abstract, or not would make a difference, to begin with.

The current design, I think helps leave all the choices at the meta-level. What do you say, @Anirudh-Kakarlapudi ?

@Jayant1234
Copy link
Contributor Author

Yeah cool, let's continue with the current plan. I was under the idea that we can't have code inside abstract methods, as in Java. But I need to check again if that's true in python, as we have been doing that already. If that is the case it does not make any difference.

@aashishyadavally
Copy link
Contributor

So, how it works here is:
You define an abstract class, with methods (abstract) simply by doing a pass under them.
It being an abstract class or not wouldn't affect method overriding in any way - it just makes it compulsary for the child classes to implement those methods.

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