PipelineItem.run attempts to resolve ambiguity in class names by creating a prompt for text input. This is unexpected and not ok for automated pipelines. I am not sure it is really helpful in resolving ambiguity either. For example:
from CHAP.saxswaxs.processor import SetupProcessor as SP
x = SetupProcessor.run(data=None)
results in this CLI prompt:
Found multiple classes named SetupProcessor in CHAP
Use SetupProcessor from: (1, 2):
1: CHAP.saxswaxs.processor
2: CHAP.utils.fit
But the code imports a specific SetupProcessor and calls .run on it, so there should be no ambiguity on which to use, right? CHAP.saxswaxs.processor.SetupProcessor.run(cls, **kwargs) should know that it is supposed use CHAP.saxswaxs.processor.SetupProcessor. It should not traverse through all of CHAP for objects with the same __name__ as cls.__name__ and offer those up as options -- we can just use cls always, right?.
PipelineItem.runattempts to resolve ambiguity in class names by creating a prompt for text input. This is unexpected and not ok for automated pipelines. I am not sure it is really helpful in resolving ambiguity either. For example:results in this CLI prompt:
But the code imports a specific
SetupProcessorand calls.runon it, so there should be no ambiguity on which to use, right?CHAP.saxswaxs.processor.SetupProcessor.run(cls, **kwargs)should know that it is supposed useCHAP.saxswaxs.processor.SetupProcessor. It should not traverse through all of CHAP for objects with the same__name__ascls.__name__and offer those up as options -- we can just useclsalways, right?.