Kevin Hu
commited on
Commit
·
22c8a6e
1
Parent(s):
8102819
fix emmpty input in graph (#1560)
Browse files### What problem does this PR solve?
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
- graph/component/base.py +9 -4
graph/component/base.py
CHANGED
@@ -456,12 +456,17 @@ class ComponentBase(ABC):
|
|
456 |
break
|
457 |
break
|
458 |
if self.component_name.lower().find("answer") >= 0:
|
459 |
-
if self.get_component_name(u) in ["relevant"]:
|
460 |
-
|
461 |
-
else:
|
|
|
|
|
|
|
462 |
break
|
463 |
|
464 |
-
|
|
|
|
|
465 |
|
466 |
def get_stream_input(self):
|
467 |
reversed_cpnts = []
|
|
|
456 |
break
|
457 |
break
|
458 |
if self.component_name.lower().find("answer") >= 0:
|
459 |
+
if self.get_component_name(u) in ["relevant"]:
|
460 |
+
continue
|
461 |
+
else:
|
462 |
+
o = self._canvas.get_component(u)["obj"].output(allow_partial=False)[1]
|
463 |
+
if o is not None:
|
464 |
+
upstream_outs.append(o)
|
465 |
break
|
466 |
|
467 |
+
if upstream_outs:
|
468 |
+
return pd.concat(upstream_outs, ignore_index=False)
|
469 |
+
return pd.DataFrame()
|
470 |
|
471 |
def get_stream_input(self):
|
472 |
reversed_cpnts = []
|