[AUR-395, AUR-415] Adopt Example1 Injury pipeline; add .flow() for enabling bottom-up pipeline execution (#32)
* add example1/injury pipeline example * add dotenv * update various api
This commit is contained in:
@@ -16,6 +16,19 @@ class BaseComponent(Compose):
|
||||
- is_batch: check if input is batch
|
||||
"""
|
||||
|
||||
inflow = None
|
||||
|
||||
def flow(self):
|
||||
if self.inflow is None:
|
||||
raise ValueError("No inflow provided.")
|
||||
|
||||
if not isinstance(self.inflow, BaseComponent):
|
||||
raise ValueError(
|
||||
f"inflow must be a BaseComponent, found {type(self.inflow)}"
|
||||
)
|
||||
|
||||
return self.__call__(self.inflow.flow())
|
||||
|
||||
@abstractmethod
|
||||
def run_raw(self, *args, **kwargs):
|
||||
...
|
||||
|
Reference in New Issue
Block a user