Skip to content

Commit 23d71fe

Browse files
JacobSzwejbkafacebook-github-bot
authored andcommitted
fix handling of optional inputs
Summary: I think emformer_predict takes an optional as an arg in python, so then when captured that arg isnt present so its flagged as Null. Differential Revision: D49894385
1 parent f4e1692 commit 23d71fe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

runtime/executor/method_meta.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Result<Tag> get_tag(
2424
return_type serialization_value,
2525
size_t index) {
2626
switch (serialization_value->val_type()) {
27+
case executorch_flatbuffer::KernelTypes::Null: {
28+
return Tag::None;
29+
} break;
2730
case executorch_flatbuffer::KernelTypes::Int: {
2831
return Tag::Int;
2932
} break;
@@ -42,7 +45,7 @@ Result<Tag> get_tag(
4245
default:
4346
ET_LOG(
4447
Error,
45-
"Invalid tag: %zu input: %zu",
48+
"Invalid tag: %zu input idx: %zu",
4649
(size_t)serialization_value->val_type(),
4750
index);
4851
return Error::Internal;

0 commit comments

Comments
 (0)