experiment: try to autocast when possible
This commit is contained in:
@ -285,10 +285,10 @@ class NodeExecutionContext(BaseContext, WithStatistics):
|
|||||||
# Store or check input type
|
# Store or check input type
|
||||||
if self._input_type is None:
|
if self._input_type is None:
|
||||||
self._input_type = type(input_bag)
|
self._input_type = type(input_bag)
|
||||||
elif type(input_bag) is not self._input_type:
|
elif type(input_bag) != self._input_type:
|
||||||
try:
|
try:
|
||||||
if type(self._input_type) == tuple:
|
if self._input_type == tuple:
|
||||||
input_bag = self._input_type(tuple)
|
input_bag = self._input_type(input_bag)
|
||||||
else:
|
else:
|
||||||
input_bag = self._input_type(*input_bag)
|
input_bag = self._input_type(*input_bag)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
|||||||
Reference in New Issue
Block a user