paris-saclay-cds / ramp-workflow

Toolkit for building predictive workflows on top of pydata (pandas, scikit-learn, pytorch, keras, etc.).
https://paris-saclay-cds.github.io/ramp-docs/
BSD 3-Clause "New" or "Revised" License
68 stars 43 forks source link

Better name for workflow objects #236

Open albertcthomas opened 4 years ago

albertcthomas commented 4 years ago

I think that navigating and debugging the code could be made easier if there were different filenames for the workflow and the submission (for instance classifier.py is both a workflow module and most of the time the module of the submission) as well as different names for the workflow objects and the submission objects.

For instance, for the classifier workflow the name used for the workflow object Classifier with train_submission and test_submission methods is the same as the Classifier object with fit and predict of the submission. This is of course even more relevant when we use workflows such as FeatureExtratorClassifier where we have a line with

self.classifier_workflow = Classifier([self.element_names[1]])

A solution would be to use classifier_workflow.py instead of classifier.py and ClassifierWorkflow for the workflow object and keep Classifer for the submission. The former might be a bit redundant and less justified if we consider only the rampwf codebase alone without a kit but the latter seems relevant as the classifier workflow object Classifier is called in FeatureExtractorClassifier and the Classifier object of the submission is called in the Classifier workflow. We could instead have

self.classifier_workflow = ClassifierWorkflow([self.element_names[1]])
agramfort commented 4 years ago

you have my blessing

albertcthomas commented 4 years ago

I'll open a PR and we can discuss details there.