ramp-workflow icon indicating copy to clipboard operation
ramp-workflow copied to clipboard

Better name for workflow objects

Open albertcthomas opened this issue 4 years ago • 2 comments

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]])

albertcthomas avatar Jun 14 '20 15:06 albertcthomas

you have my blessing

agramfort avatar Jun 16 '20 15:06 agramfort

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

albertcthomas avatar Jun 19 '20 08:06 albertcthomas